Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com Path: not-for-mail From: Andrew DeFaria Subject: Re: How can I abbreviate /cygdrive/DRIVELETTER ? Date: Thu, 16 Jan 2003 15:20:09 -0800 Lines: 46 Message-ID: <3E273E29.8020601@Salira.com> References: <13016 DOT 1042722817 AT www63 DOT gmx DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT main DOT gmane DOT org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en, ru, zh svartsjel AT gmx DOT net wrote: > Hi everyone! > > As I often access different drives from within the bash I'm wondering > if there's a quicker way to get on, say, drive l (a network drive) > than entering 'cd /cygdrive/l'? I alias'd '/cygdrive/l' to 'l' which > works fine for cd, but not for commands like chmod, cp, mv etc. Among > others I'd like to use the automatic command line completion which > doesn't work for /cygdrive/... either. > Any suggestions? I've long since changed the cygdrive prefix to /dev. Seemed like a natural place to put it and it's fairly short. Never encountered a problem. However for cd'ing to a common location I tend to use environment variables such as: $ export src="//server/share/path/to/src/file" Then do things like cd $src. Normally, important areas are set up in my startup scripts. The nice thing is that if you wanted to say "more" a file that works to, with file name completion as in: $ more $src/a/sub Changes to $ more //server/share/path/to/src/file/a/subdirectory. Oh, and I also tend to use UNC names instead of mounting drive letters. So even if one did $ net use L: \\\\server\\share\\path\\to\\src\\file I would still tend to use the UNC name of //server/share/path/to/src/file or $src. One reason for this is that one persons L: drive may be another server/share all together on another desktop machine. With UNC names there is no ambiguity. Note that while file name completion doesn't work on just a /cydri it will work after /cygdrive. Similarly filename completion does not work on //server/sha but if you type //server/share/pa it will start working. IOW you need to get past the server and share portions fully before file name completion is operative. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/