bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

invalid history expansion and tab expansion


From: Tim Connors
Subject: invalid history expansion and tab expansion
Date: Sun, 4 Feb 2001 17:45:26 +1100 (EST)

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: Linux
Compiler: cc
Compilation CFLAGS:   -DHAVE_VFPRINTF -DHAVE_UNISTD_H -DHAVE_STDLIB_H
-DHAVE_LIMITS_H        -DHAVE_GETGROUPS -DHAVE_RESOURCE -DHAVE_SYS_PARAM
-DVOID_SIGHANDLER -DHAVE_GETDTABLESIZE -DHAVE_BCOPY -DHAVE_GETPW_DECLS
-DHAVE_GETHOSTNAME -DHAVE_WAIT_H         -DHAVE_DUP2 -DHAVE_STRERROR 
-DHAVE_DIRENT_H -DHAVE_STRING_H        -DHAVE_VARARGS_H -DHAVE_STRCHR 
-DHAVE_DEV_FD        -Di386 -DLinux -DSHELL -DHAVE_ALLOCA -DHAVE_ALLOCA_H       
 
-O -g
uname output: Linux home.home 2.2.17 #4 Thu Dec 28 12:41:28 EST 2000 i586
unknown

Bash Version: 1.14
Patch Level: 7

Description:
With tab autocomplete, it usually generates the correct quotes around
filenames with tricky characters - but an bang in a file name causes
history expansion to be executed, without the correct quotes (',
instead of ") being used upon tab autocomplete.

Similarily, a filename with a single quote in it does not get the quote
escaped if the filename was entered with a single quote starting the file,
then tab autocompleted.

Repeat-By:
use some program to create a file called "I'm screwed!"

Then type
echo "I<tab>
 
will work, but

creating a file called "Youre screwed!" (without the single quote) then
echo "Y<tab>
will come up with "event not found"

Similarly, 
echo 'I<tab>

will not escape the real single quote in the filename.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]