Completion does not work as expected when globbing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu
Ubuntu 14.04.1 LTS
2) The version of the package you are using, via 'apt-cache policy pkgname' or by checking in Software Center
2.1-4
3) What you expected to happen
When I type in bash:
> ls ~/.bash*<Tab><Tab>
I expected to see completions like
.bash_history .bash_logout .bashrc
4) What happened instead
Nothing happens, I get no completions.
In another case if I have a bunch of .deb files in my current directory I would expect:
> ls *.deb<Tab><Tab>
To suggest something like:
bash-completion
But it does not.
I can add a line like this to my .bashrc:
compopt -o bashdefault ls
And it will make it to where globbing completion works for ls, but not for every other command. In order to do so I have to modify my /usr/share/
1943: # set up dynamic completion loading
1944: _completion_
1945: {
1946: local compfile=
1947: [[ $BASH_SOURCE == */* ]] && compfile=
1948: compfile+
1949:
1950: # Avoid trying to source dirs; https:/
1951: [[ -f "$compfile" ]] && . "$compfile" &>/dev/null && return 124
1952:
1953: # Need to define *something*, otherwise there will be no completion at all.
1954: complete -F _minimal "$1" && return 124
1955: } &&
1956: complete -D -F _completion_loader
to
1943: # set up dynamic completion loading
1944: _completion_
1945: {
1946: local compfile=
1947: [[ $BASH_SOURCE == */* ]] && compfile=
1948: compfile+
1949:
1950: # Avoid trying to source dirs; https:/
1951: [[ -f "$compfile" ]] && . "$compfile" &>/dev/null && return 124
1952:
1953: # Need to define *something*, otherwise there will be no completion at all.
1954: complete -F _minimal -o bashdefault "$1" && return 124
1955: } &&
1956: complete -D -F _completion_loader
This will be overwritten when I upgrade bash-completion, though.
Status changed to 'Confirmed' because the bug affects multiple users.