bug-bash
[Top][All Lists]
Advanced

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

Autocompletion problems with nounset and arrays


From: Eric Pruitt
Subject: Autocompletion problems with nounset and arrays
Date: Mon, 25 Apr 2016 22:09:46 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../. -I.././include -I.././lib  -D_FORTIFY_SOURCE=2 -g 
-O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall
uname output: Linux sinister 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 
(2016-02-29) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 30
Release Status: release

Description:
        There's a quirk with Bash's autocompletion when trying to use tab
        completion with built-in arrays while the nounset option is enabled:

        ~$ echo ${BASH_AL<Tab>bash: BASH_ALIASES: unbound variable
        IASES}

        Note that this happens using Bash's built-in completion; my Bash
        configuration includes "complete -r" since many of the compgen
        completions written for Bash use unset variables.

Repeat-By:
        Run "set -u" then type "${BASH_AL" then hit "Tab".

Fix:
        Not sure what the best approach is, but one way to work around this
        would be to ignore nounset when autocompleting array names.



reply via email to

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