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)
rawhide
All Linux
high Severity low
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  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
Environment:
Last Closed: 2016-02-19 12:40:24 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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):

bash-completion-2.1-9.20150513git1950590.fc24.noarch

How reproducible:

Always

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
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=3
0;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01
;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31
:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:
*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31
:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01
;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m
2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:
*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:
*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.m4a=01;36:*.mid=01;36:*.midi=01;

$ 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.