Bash-completion: Hitting "tab" after typing "tar xvzf " or "tar -xvzf " results in an error instead of completion. If the "f" option is separated from the others by a blank, then the completion is successful. Reproducible: Always Steps to Reproduce: 1.Type "tar xvzf " or "tar -xvzf " 2.Hit "tab" 3. Actual Results: $ tar xvzf bash: no match: t?(ar.)@(gz|Z) Expected Results: Completion in case of a single tar file, or a list where there are multiple tar files. GNU bash, version 3.2.15(1)-release (x86_64-pc-linux-gnu) app-shells/bash-completion-20060301
I cannot reproduce this at all... $ tar xvzf <tab><tab> Display all 382 possibilities? (y or n)
(In reply to comment #1) > I cannot reproduce this at all... > > $ tar xvzf <tab><tab> > Display all 382 possibilities? (y or n) > Well, if I remove everything from my .bashrc except for the bash completion stuff it works. There must be something there that's causing the problem. When I isolate the cause I'll comment back.
Well, you should set anything else (aliases etc.) *after* sourcing /etc/profile.d/bash-completion; anyway, your local stuff in .bashrc is not a bash-completion bug. :)
(In reply to comment #3) > Well, you should set anything else (aliases etc.) *after* sourcing > /etc/profile.d/bash-completion; anyway, your local stuff in .bashrc is not a > bash-completion bug. :) > Actually *everything* is set after sourcing /etc/profile.d/bash-completion, as per instructions on the bash-completion ebuild. I found the reason of this problem. I had: shopt -s failglob in my .bashrc. Removing this line results in the correct behaviour. The people responsible for bash-completion should tell if this is a bug or not, but at least there is conflict between a shell option and bash-conpletion. Anyway, if this is normal, expected, or unavoidable, it would be fine to let users know that this option might mess up bash completion. jorges
man bash: <snip> failglob If set, patterns which fail to match filenames during pathname expansion result in an expansion error. </snip> Well, then don't complain about this, because it's a bash feature you've turned on.