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
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
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
>>
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
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
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/$