4.3 compgen behavior change (quoted arg)

2013-02-13 Thread Raphaël Droz
I'm not sure whether or not this is to be expected. $ echo $BASH_VERSION 4.2.42(1)-release $ touch a.log $ compgen -f -X '!*.log' -- \'\' $ $ echo $BASH_VERSION 4.3.0(3)-devel $ touch a.log $ compgen -f -X '!*.log' -- \'\' a.log $ This kind of "quoted" call is used by bash-completion _filedi

Re: 4.3 compgen behavior change (quoted arg)

2013-02-13 Thread Chet Ramey
On 2/13/13 5:46 AM, Raphaël Droz wrote: > I'm not sure whether or not this is to be expected. > > $ echo $BASH_VERSION > 4.2.42(1)-release > $ touch a.log > $ compgen -f -X '!*.log' -- \'\' > $ > > > $ echo $BASH_VERSION > 4.3.0(3)-devel > $ touch a.log > $ compgen -f -X '!*.log' -- \'\' > a.l

Re: Is this intended behavior??

2013-02-13 Thread Chet Ramey
On 2/11/13 2:25 PM, Bruce Korb wrote: >> /tmp >> $ echo "$PS1" >> \w\n\$ >> /tmp >> $ mkdir -p ZZ/a/b/c >> /tmp >> $ pushd ZZ >> /tmp/ZZ /tmp >> /tmp/ZZ >> $ pushd a >> /tmp/ZZ/a /tmp/ZZ /tmp >> /tmp/ZZ/a >> $ pushd b/c >> /tmp/ZZ/a/b/c /tmp/ZZ/a /tmp/ZZ /tmp >> /tmp/ZZ/a/b/c >> $ popd /var/tmp >>

Re: eval doesn't close file descriptor?

2013-02-13 Thread Matei David
Thank you for the explanation. On Tue, Feb 12, 2013 at 8:32 PM, Chet Ramey wrote: > On 2/12/13 11:40 AM, Pierre Gaston wrote: > > On Tue, Feb 12, 2013 at 6:07 PM, Matei David > wrote: > > > >> Ok, but I see the same behaviour when eval runs in a subshell: > >> > >> $ bash -c 'llfd () { echo "p

Re: Is this intended behavior??

2013-02-13 Thread Bruce Korb
Hi, On Wed, Feb 13, 2013 at 9:01 AM, Chet Ramey wrote: > On 2/11/13 2:25 PM, Bruce Korb wrote: [...] >>> /tmp/ZZ/a/b/c /tmp/ZZ/a /tmp/ZZ >>> /tmp/ZZ/a/b/c >>> $ popd /var/tmp >>> /tmp/ZZ/a/b/c /tmp/ZZ/a >>> /tmp/ZZ/a/b/c >>> $ >> >> It is behaving as if it were seeing the "-0" option. > > It's un

Re: eval doesn't close file descriptor?

2013-02-13 Thread Matei David
Another thing I tried was to open a fd with <() and use it later in a shell function. Surprisingly, the fd disappears (is closed) if the shell executes something unrelated in subshell: $ bash -c 'xxx () { echo "got arg: $1" >&2; ls -gG /proc/$BASHPID/fd >&2; (echo "subprocess" >&2); ls -gG /proc/$