bash-completition wrong escapes special characters for mercurial
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: bash-completion
When I do
# hg add Ann<TAB>
I get
# hg add Annex A.txt
Should be:
# hg add Annex\ A.txt
But! If I have file in the same directory, which name has same first letters, everything is OK.
E.g.:
# ls Ann*
Annex A.txt
Annex B.txt
# hg add Ann<TAB>
I get
# hg add Annex\
So, completition doesn't escape spaces (and other characters like '&') for mercurial when there is only one possibility for completition. When there are several choices all is OK.
ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
NonfreeKernelMo
Package: bash-completion 20080705ubuntu3
PackageArchitec
ProcEnviron:
PATH=(custom, user)
LANG=uk_UA.UTF-8
SHELL=/bin/bash
SourcePackage: bash-completion
Uname: Linux 2.6.28-15-generic i686
Changed in bash-completion (Ubuntu): | |
status: | New → Confirmed |
My mercurial tab completion is also messed up, but not in quite the same way. Some commands, like 'hg log ...' are fine. 'hg add ...' has problems: if I have one possibility, I get the filename with unescaped spaces. If I have multiple possibilities, it *doesn't* work correctly for me. The first time I press tab I get the common prefix, and what happens next depends on whether the common prefix contains a space. If it contains a space, weird things happen when I press tab more times because once the prefix has been echoed everything after the space is considered to be a new filename.
I'm pretty sure this is a problem in Natty's bash completion rather than Mercurial's bash completion file -- I have tried two new versions (1.9.0 and 1.9.1) from PPAs, and the 1.9.0 PPA version was working correctly in Lucid and in Maverick.
If I don't source /etc/bash_ completion in .bashrc, I get saner behaviour with mercurial, but as far as I understand that's turning off all the custom bash completion entirely, and I no longer have useful functionality like 'hg add ...' only completing files not already under version control, and so on.