[Bug 1813090] Re: bash completions in /usr/share/bash-completion generate unbound variable errors

Will Palmer wmpalmer at gmail.com
Sat Oct 26 14:52:25 UTC 2019


re-adding attachment due to copy&paste error

** Attachment added: "add -g to declare of _xspecs to ensure it stays in the global scope"
   https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1813090/+attachment/5300381/+files/bash_completion.p

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/1813090

Title:
  bash completions in /usr/share/bash-completion generate unbound
  variable errors

Status in bash package in Ubuntu:
  New
Status in bash-completion package in Ubuntu:
  New

Bug description:
  After upgrading from Ubuntu 18.04 LTS to 18.04.1 LTS, I get errors
  whenever I attempt to tab-complete anything from an interactive bash
  prompt.

  Tab-completing nothing gives me:

      -bash: _xspecs[$cmd]: unbound variable

  Tab-completing an existing filename gives me:

      -bash: !ref: unbound variable

  I've partially narrowed down the cause to me putting `set -o nounset`
  in my `.bashrc` file, and something in `/usr/share/bash-completion` is
  triggering these unbound variable errors. (That is, the errors go away
  if I remove `set -o nounset` or if I make `/usr/share/bash-
  completion/bash_completion` exit immediately.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1813090/+subscriptions



More information about the foundations-bugs mailing list