Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#67808 - bash completion breaks with nocaseglob
Attached to Project:
Pacman
Opened by Alexandre Bouvier (doskoi) - Wednesday, 02 September 2020, 16:37 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 05 April 2021, 23:32 GMT
Opened by Alexandre Bouvier (doskoi) - Wednesday, 02 September 2020, 16:37 GMT
Last edited by Eli Schwartz (eschwartz) - Monday, 05 April 2021, 23:32 GMT
|
DetailsDescription:
Setting the nocaseglob shell option in bash (in ~/.bashrc or directly in the shell) breaks pacman completion for some commands like "-S" or "-R", but not "-Q". Maybe the option should be explicitly disabled in the completion script (and his state saved/restored before returning). Additional info: bash 5.0.018-1 bash-completion 2.11-1 pacman 5.2.2-1 Steps to reproduce: $ pacman -S xx<TAB> xxhash xxkb $ pacman -Q arch<TAB> arch-audit arch-install-scripts archlinux-keyring $ shopt -s nocaseglob $ pacman -S xx<TAB> $ pacman -Q arch<TAB> arch-audit arch-install-scripts archlinux-keyring |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Monday, 05 April 2021, 23:32 GMT
Reason for closing: Upstream
Additional comments about closing: bug is in bash < 5.1
Monday, 05 April 2021, 23:32 GMT
Reason for closing: Upstream
Additional comments about closing: bug is in bash < 5.1
> elif [[ ! $prev =~ ^-[[:alnum:]_]*[Vbhr] &&
This is broken by nocaseglob causing erroneous matches for -v, -B, -H, -R of which -R is relevant.
Generally, our shell completions use regular expression matching. Why is this even getting tripped up by nocaseglob which is specific to *files*? Very confusing...
Ah: https://stackoverflow.com/questions/62397088/bash-regex-match-is-case-insensitive/62435670#62435670
https://git.savannah.gnu.org/cgit/bash.git/diff/?id=aa99ef520f943369c826b02f3398fa8eab7bfdfb
Should be fixed in bash's devel branch. It's quite purely just a bug in bash. I'm inclined to think nocaseglob is simply too broken to use until then, because there's way too many ramifications for regexp here. Quite possibly, we're broken "literally everywhere".