-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mangled completion with tilde and Bash option 'failglob' #306
Comments
I noticed another, more serious issue with tilde. This time, this is triggered by the Bash option Configuration: same Steps to reproduce:
# start with a clean environment and configuration:
$ env -i bash --norc --noprofile
$ ls -F ~
dir_in_home/ file_in_home
$ ls -F .
dir_in_currentdir/ file_in_currentdir
# no bash-completion, 'nullglob' off:
$ shopt -u nullglob
$ ls ~/‹tab›‹tab›
dir_in_home/ file_in_home
# no bash-completion, 'nullglob' on:
$ shopt -s nullglob
$ ls ~/‹tab›‹tab›
dir_in_home/ file_in_home
# with bash-completion, 'nullglob' off:
$ source /usr/share/bash-completion/bash_completion
$ shopt -u nullglob
$ ls ~/‹tab›‹tab›
dir_in_home/ file_in_home
# with bash-completion, 'nullglob' on:
$ shopt -s nullglob
$ ls ~/‹tab›‹tab›
dir_in_currentdir/ dir_in_home/ file_in_currentdir As can be seen, when option Again this happens with |
I don't expect it to necessarily make a difference, but please try out with the current master branch from here, or 2.9 (it was released earlier today). I'll get to this soonish unless someone beats me to it. In the meantime, see Troubleshooting in README.md. |
Looks like upgrading bash-completion to 2.9-1 (from Archlinux’ package) fixed both issues. Thanks! Plus, oh my, my long-gone |
Completion of paths involving a tilde has become unusable since a recent system upgrade, presumably since Bash has been upgraded to version 5.0 (hence it might be related to issue #298, but symptoms differ). I identified that the issue only arises when Bash option
failglob
is set.Configuration:
Steps to reproduce:
‹tab›
represents pressing the tabulation key (for completion),^C
represents the Control+c shortcut (to abort the current command line).The expected completion always gets appended to the command line but, when
failglob
is on, an error message is also printed (hereinabove, shown between brackets for clarity):This is the error message printed by Bash when pathname expansion fails and
failglob
option is on. Note that the tilde is incorrectly escaped. This message is not appended to the command line, but it mangles the display.This happens with many commands, including
ls
,mv
,rm
and any custom command, but not withcd
. However\cd
does trigger the error, even though there is no alias of that name.The text was updated successfully, but these errors were encountered: