Re: premature execution of command substution during tab completion solicitation

2008-01-18 Thread Chet Ramey

jared r r spiegel wrote:

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: openbsd4.0
Compiler: cc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='openbsd4.0' -DCONF_MACHTYPE='i386-unknown-openbsd4.0' 
-DCONF_VENDOR='unknown' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL  -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  -I/usr/local/include 
-O2 -pipe
uname output: OpenBSD iorek.ice-nine.org 4.0 IOREK.MP#1 i386
Machine Type: i386-unknown-openbsd4.0

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:
unexpected execution of incomplete (and currently syntactically 
invalid?)
commandline by tab-completion subsystem


The problem is the completion system's attempt to run the directory
portion of the filename to be completed through the set of shell word
expansions.  It's not appropriate to perform command substitution in
that case.  This will be fixed for the next bash version.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
   Live Strong.  No day but today.
Chet Ramey, ITS, CWRU[EMAIL PROTECTED]http://cnswww.cns.cwru.edu/~chet/




"Bad substitution error" is not "well" reported, when invoking and array.

2008-01-18 Thread Andres Sajo
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include
-I../bash/lib   -g -O2 -Wall
uname output: Linux tasse 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57
UTC 2007 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.2
Patch Level: 25
Release Status: release

Description:
"Bad substitution error" is not "well" reported, when invoking
and array:
VAR='([0]=first [1]=second)'
${VAR[0] } works, but ${ VAR[0]} dosen't


Repeat-By:

[EMAIL PROTECTED]:~$ declare -a NAME[0]="Andres" NAME[1]="Sajo"
[EMAIL PROTECTED]:~$ declare -p NAME
declare -a NAME='([0]="Andres" [1]="Sajo")'

## Command 1
[EMAIL PROTECTED]:~$ echo ${ NAME[0]}
bash: ${ NAME[0]}: bad substitution

##Command 2
[EMAIL PROTECTED]:~$ echo ${NAME[0] }
Andres
##Should have reported the previous error

[EMAIL PROTECTED]:~$ echo ${NAME[0]}
Andres

## The "bad substitution error" should be OR in both Commands OR in
none of them.

Fix:
None



  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs




bash does not jump where it is supposed to jump

2008-01-18 Thread William Tambe

Please read the comments on the code below.
I don't know but is it really how bash was supposed to run?

The code below should only print end



[ "test" = "test" ] && {
# after the false command bash should jump directly to echo end
# but instead run echo echo "test != test"
false
} || {
echo "test != test"
}

echo end