[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash incorrectly calls completion function in certain circumstances
From: |
ian |
Subject: |
bash incorrectly calls completion function in certain circumstances |
Date: |
Wed, 20 Oct 2004 01:03:18 -0700 (PDT) |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_FILE_OFFSET_BITS=64 -O2 -g
-pipe -march=i386 -mcpu=i686
uname output: Linux sagan.caliban.org 2.6.8.1 #1 SMP Sat Aug 28 13:07:48 PDT
2004 i686 i686 i386 GNU/Linux
Machine Type: i686-redhat-linux-gnu
Bash Version: 3.0
Patch Level: 13
Release Status: release
Description:
When a completion function is installed for a given command,
attempting to complete the RHS of a variable assignment that
uses that command's name will result in the completion function
being erroneously invoked.
Repeat-By:
An example:
$ _gzip() { echo -e "\n$COMP_CWORD"; }
$ complete -F _gzip gzip
$ # Normal behaviour:
$ gzip <Tab>
1
$ # The following, however, should not occur:
$ foo=/tmp/gzip<Tab>
0
$
As you can see, the _gzip() function is being invoked in an
attempt to complete the RHS of the variable assignment. This
should not happen, as gzip is not being invoked as a command
here. Instead, normal file completion should occur.
/tmp/gzip does not exist. If /bin/gzip is used instead, normal
file completion _does_ occur.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bash incorrectly calls completion function in certain circumstances,
ian <=