Subject: Re: [feature request] completion of paths with Windows drive letters
From: Andrew DeFaria <[email-masked]>
To: [email-masked]
Date: Wed, 17 Apr 2002 10:56:55 -0700
Newsgroups: gmane.os.cygwin

Chris Metcalf wrote:

>Configuration Information [Automatically generated, do not change]:
>Machine: i686
>OS: cygwin
>Compiler: i686-pc-cygwin-gcc
>Compilation CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H   -I.  -I../bash-2.05a -I../bash-2.05a/include -I../bash-2.05a/lib -g -O2
>uname output: CYGWIN_NT-4.0 CHRIS 1.3.10(0.51/3/2) 2002-02-25 11:14 i686 unknown
>Machine Type: i686-pc-cygwin
>
>Bash Version: 2.05a
>Patch Level: 0
>Release Status: release
>
>Description:
>	Under cygwin, it would be convenient to allow filename completion
>	on files including any leading drive letter.  Chet Ramey pointed
>	out that bash tells readlist to word-break on colons, to enable
>	(for example) direct editing of components of $PATH.  I suspect
>	that Cygwin users would benefit from being able to disable this
>	feature, and getting filename completion with drive letters.
>	Note that globbing does work with drive letters (of course), so
>	there's a consistency argument that filename completion should too.
>
>Repeat-By:
>	"ls c:/win<TAB>" should expand to your Windows directory on cygwin.
>
>Fix:
>	One workaround (pointed out by Chet) is to backslash-escape
>	the colon.  This is good to know but a bit awkward in practice.
>
>	Another workaround, at least for C:, is to install cygwin 
>	directly to C:/, instead of C:/cygwin, which will effectively
>	fix the problem for C: paths, though of course not for paths
>	prefixed with other drive letters.  
>
>	One possible take on this issue is as follows.  There are certain 
>	characters that bash treats as word breaks to enable additional
>	functionality.  ":", as described above, is one.  "@" is another;
>	some users may prefer to allow "@" in their paths, and disable
>	automatic hostname completion.  A general solution might be to
>	allow specifying characters to treat as normal word characters
>	rather than word break characters, and allow users to specify
>	"", ":", "@", ":@" (etc) as they please.  But a 90% solution
>	would certainly be to just add a shopt flag that removes colons
>	from the list of word-break characters passed to readlist.
>
You could always use something like ls /cygdrive/c/win<tab> or do like I 
do and change cygdrive prefix to dev with a mount command. Then it would 
be /dev/c/win<tab>.

--
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/