Mail Archives: djgpp/2001/03/21/05:11:29
On Tue, 20 Mar 2001, Jason Green wrote:
> Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
>
> > I'm not sure the colon needs to be escaped (why?)
>
> I don't know, but Bash seems to want it (something to do with using
> ':' to seperate paths perhaps ??)
>
> This is from Linux:
>
> bash-2.03$ mkdir -p "c:/foo bar"
> bash-2.03$ rmdir -p c:/foo
> press TAB - nothing happens, so complete the line manually
> bash-2.03$ rmdir -p c:/foo\ bar
> bash-2.03$
>
> Now try with the colon escaped:
>
> bash-2.03$ mkdir -p "c:/foo bar"
> bash-2.03$ rmdir -p c\:/foo
> press TAB
> bash-2.03$ rmdir -p c\:/foo\ bar/
> bash-2.03$
>
> Escaping the colon helps Bash to complete the path.
On Unix, I understand why does Bash do that. But the DJGPP port
shouldn't do that, since a colon is routinely used in file names.
It would be a nuisance to require users to escape the colon after the
drive letter in each file name they type.
> bash-2.04$ mkdir "c:/foo bar"
> bash-2.04$ rmdir "c:/foo
> press TAB
> bash-2.04$ rmdir "c:/foo bar/
> complete the last quote manually
> bash-2.04$ rmdir "c:/foo bar/"
> bash-2.04$
>
> > Right now, I need to type this:
> >
> > bash-2.04$ rmdir "c:/foo" TAB
> >
> > (note the closing quote) to get Bash 2.04 DTRT, but it then removes
> > the quotes after the completion :-(.
>
> What version?
>
> bash-2.04$ bash --version
> GNU bash, version 2.04.7(1)-release (i386-pc-msdosdjgpp)
> Copyright 1999 Free Software Foundation, Inc.
I have the same version. Curiously, I cannot reproduce this now: it
works like you show above. Strange...
- Raw text -