delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/21/05:11:29

Date: Wed, 21 Mar 2001 12:06:55 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Jason Green <news AT jgreen4 DOT fsnet DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Tab completion in BASH 2.04
In-Reply-To: <g1lfbtkjfn9o09pfnuf6rdpii7ou2n7v4u@4ax.com>
Message-ID: <Pine.SUN.3.91.1010321120637.24397X-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019