On 8/9/10 12:02 PM, Egmont Koblinger wrote: > Start over, type the following (replace TAB by pressing the TAB key): > ps1$ cd /biTAB` > The auto-completed command looks exactly as the manually typed one, hence > the expected behavior is the same. However, press Enter, and the primary > prompt gets displayed. Logically, however, this is still a secondary prompt > (if you type another command, or press ^D, the behavior suggests this). > > Start over, type the following: > ps1$ cd /biTAB` > ps1$ cd /sbTAB` > The following error is printed: > bash: bad substitution: no closing `}' in "${to` > cd /sbin/` > > Note that bash_completion doesn't have a shell variable named "to", it only > has "toks", so seems like parsing the file pretty much goes off the track. > The error message cuts this word in half at a position depending on the > length of the directory pathnames.
You're correct that this was a bug in bash. Both of these are the result of the same bug, which will be fixed in bash-4.2. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/