Bug 1309920 - bash completion unbound variables errors after "unset LS_COLORS" command
bash completion unbound variables errors after "unset LS_COLORS" command
Status: CLOSED DUPLICATE of bug 1055784
Product: Fedora
Classification: Fedora
Component: bash-completion (Show other bugs)
All Linux
high Severity low
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-02-18 19:18 EST by Noel McLoughlin
Modified: 2016-02-19 12:40 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1055784
Last Closed: 2016-02-19 12:40:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Noel McLoughlin 2016-02-18 19:18:05 EST
+++ This bug was initially created as a clone of Bug #1055784 +++

Description of problem:

Executing 'unset LS_COLORS' results in 'unbound variable errors' from bash completion.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. $ /bin/bash
2. $ unset LS_COLORS
3. Use bash completion
   (a) Type any command AND hit the tab key
   (b) Hit the tab key

Actual results:

(a) Type any command AND hit the tab key

$ cd <TAB KEY HERE>-bash: !ref: unbound variable
cd ER-bash: !ref: unbound variable

$ systemct -bash: !ref: unbound variable

(b) Hit the tab key

$ -bash: words[@]: unbound variable

Expected results:

TBD via consensus

Additional info:

$ env | grep LS_COLORS

$ unset LS_COLORS
Comment 1 Ville Skyttä 2016-02-19 10:22:04 EST
I cannot reproduce, neither in F-23 with upstream bash-completion development head, nor with a clean mock F-24 chroot. And quite frankly, I don't see how unsetting LS_COLORS could actually result in the described problems. Going to need more information in order to be say much more.

On the other hand, these errors after "set -u" or "set -o nounset" and as described in bug #1055784 is a known limitation in bash-completion, documented in its README's troubleshooting section. Have you made sure that this is not the actual source of the issue you see?
Comment 2 Noel McLoughlin 2016-02-19 12:39:56 EST
My bad. I've been troubleshooting #1306804 and did indeed run "set -u" before running "unset" command. Sorry you spent time on this.

[bob@rawhide ws]$ history | grep LS_COLORS
  132  set -u LS_COLORS
  135  unset LS_COLORS
  152  unset LS_COLORS
  158  unset LS_COLORS
  189  env | grep LS_COLORS
  190  unset LS_COLORS
  198  history | grep LS_COLORS
[bob@rawhide litp]$ 
[bob@rawhide litp]$ set -u LS_COLORS
[bob@rawhide litp]$ -bash: words[@]: unbound variable

Closing this as duplicate.
Comment 3 Noel McLoughlin 2016-02-19 12:40:24 EST

*** This bug has been marked as a duplicate of bug 1055784 ***

Note You need to log in before you can comment on or make changes to this bug.