bash-completion fails under "set -o nounset"

Bug #461318 reported by Ian! D. Allen
This bug report is a duplicate of:  Bug #663111: errors with set -o nounset. Edit Remove
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
bash-completion (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: bash-completion

Ubuntu 9.10rc
bash-completion: Installed: 1:1.0-3ubuntu2

If you turn on "nounset" to warn about undefined variables, then
bash_completion fails to load and fails to run.

idallen@ubuntu:~$ set -o nounset
idallen@ubuntu:~$ . /etc/bash_completion
bash: BASH_COMPLETION_DEBUG: unbound variable
bash: BASH_COMPLETION: unbound variable
bash: BASH_COMPLETION_DIR: unbound variable
bash: BASH_COMPLETION: unbound variable
bash: list[@]: unbound variable
bash: BASH_COMPLETION_DIR: unbound variable
bash: BASH_COMPLETION: unbound variable

idallen@ubuntu:~$ set +o nounset
idallen@ubuntu:~$ cd /[TAB]
bin/ etc/ media/ root/ sys/
boot/ home/ mnt/ sbin/ tmp/
cdrom@ lib/ opt/ selinux/ usr/
dev/ lost+found/ proc/ srv/ var/

idallen@ubuntu:~$ set -o nounset
idallen@ubuntu:~$ cd /[TAB] bash: COMPREPLY[@]: unbound variable

etc.

All references to variables that might be unset should be replaced with
"${variable-}" to avoid these errors.

ProblemType: Bug
Architecture: i386
Date: Mon Oct 26 11:01:24 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release Candidate i386 (20091020.3)
Package: bash-completion 1:1.0-3ubuntu2
PackageArchitecture: all
ProcEnviron:
 LC_COLLATE=C
 PATH=(custom, user)
 LANG=C
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: bash-completion
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
Ian! D. Allen (idallen) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bash-completion (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.