User-local Bash completions not loading
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
python-argcomplete (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I'm on Noble. I don't believe there's anything special about my environment with respect to Bash completions. I had pipx installed to prevent conflicts with the system python, which brings in the python3-argcomplete package. I've temporarily removed the former but kept the latter, in order to investigate my problem.
When argcomplete is installed, completions in ~/.local/
_zz () {
COMPREPLY=
} && complete -F _zz zz
At a fresh Bash prompt, I type "zz " then hit Tab. It will only complete filenames from the current dir, not from the specified argument set. Under "bash -x", the trace after doing so begins with this:
+ [[ -n '' ]]
+ local _BASH_REMATCH=
+ local executable=
+ req_argv=()
+ local req_argv
+ [[ -z '' ]]
+ executable=zz
+ req_argv=("" "${COMP_
+ __python_
...
If I uninstall the argcomplete package and do the same, fresh prompt each time, my completions work again. I can reliably toggle this behaviour by reinstalling & uninstalling it. The successful trace begins with this:
+ local cmd=zz
+ __load_completion zz
+ dirs=('
+ local -a dirs
...