Bugs item #313270, was opened at 2011-08-04 00:29 You can respond by visiting: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313270&group_id=100114
Status: Open Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: "set -u" crashes bash_completion Distribution: --Distribution-Agnostic-- Originally reported in: None Milestone: None Status: None Original bug number: Initial Comment: Anonymous message posted by p...@mac.com When the shell has "set -u" or "set -o nounset", which cause references to unset variables to error, bash_completion errors in two ways: 1. On sourcing bash_completion: $ env -i bash --login --noprofile --norc bash-3.2$ set -u ; . /sw/etc/bash_completion bash: BASH_COMPLETION_DEBUG: unbound variable bash: BASH_COMPLETION: unbound variable bash: BASH_COMPLETION_DIR: unbound variable bash: BASH_COMPLETION_COMPAT_DIR: unbound variable bash: BASH_COMPLETION: unbound variable bash: list[@]: unbound variable bash: BASH_COMPLETION_COMPAT_DIR: unbound variable bash: BASH_COMPLETION_DIR: unbound variable bash: BASH_COMPLETION: unbound variable 2. When trying to complete: bash-3.2$ ls <tab>bash: !ref: unbound variable bash: !ref: unbound variable bash: words[i]: unbound variable This is in $ bash --version GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) Copyright (C) 2007 Free Software Foundation, Inc. with bash_completion 1.3. Patch attached. Most of the issues are in the bash_completion file itself. A few files in bash_completion.d/ make reference to undefined variables on the complete line, for example fink: complete $filenames -F _fink fink I've removed these variable references, since I can't see that they are set anywhere. If they are used in some cases, these should be restored as "${filenames:-}", etc. Thanks, Peter ---------------------------------------------------------------------- You can respond by visiting: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313270&group_id=100114 _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel