bug-bash
[Top][All Lists]
Advanced

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

Completion called within command substitution


From: Freddy Vulto
Subject: Completion called within command substitution
Date: Fri, 25 Sep 2009 22:13:21 +0200

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 myhost 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC
2009 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

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

When completing command substitution:

    $ a $(b c<TAB>

the command completion for `a' is invoked, whereas I'd expect the
command completion for `b' to be invoked.
I would expect the same behaviour as with process substitution, which
invokes the completion for `b':

    $ a <(b c<TAB>

Steps to reproduce:

1.  Create functions `_a' and `_b' to complete `a' and `b':

    _a() { echo a; }
    _b() { echo b; }
    complete -F _a a
    complete -F _b b

2.  Complete `b' within command substition:

    $ a $(b c<TAB>  # This returns `a', where I'd expected `b'?

3.  Complete `b' within process substitution:

    $ a <(b c<TAB>  # This returns `b' all right.


Regards,

Freddy Vulto
http://fvue.nl




reply via email to

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