From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: Tab completion in BASH 2.04 Date: Tue, 20 Mar 2001 22:37:36 +0000 Lines: 69 Message-ID: References: NNTP-Posting-Host: modem-87.neon.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news8.svr.pol.co.uk 985127811 14127 62.136.9.87 (20 Mar 2001 22:36:51 GMT) NNTP-Posting-Date: 20 Mar 2001 22:36:51 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Agent 1.7/32.534 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Eli Zaretskii 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. Somehow this happens automagically in the DJGPP port of Bash 2.03, and this feature appears to be missing from the port of 2.04. > Also, perhaps Bash should support completion when the file name is > quoted, like this: > > > bash-2.04$ rmdir "c:/foo TAB It does: bash-2.03$ mkdir "c:/foo bar" bash-2.03$ rmdir "c:/foo press TAB bash-2.03$ rmdir "c:/foo bar"/ bash-2.03$ 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 guess this is one more reason not to use spaces in file names ;-) And spaces in filenames are one good reason for the DJGPP port of Bash to support them... ;-) Note that these problems are only apparent when the path contains a dos drive letter and colon, otherwise Bash 2.04 behaves as expected.