wishlist: bash completion could do better with umount with spaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash-completion (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: bash-completion
For example, with a common USB drive that mounts as "/media/My Passport" ...
# mount|grep sdb1
/dev/sdb1 on /media/My Passport type vfat (rw,nosuid,
# umount /media/My
The tab-complete stops at My and doesn't escape the space or put quotes around.
The recipe for rsync does the right thing...
# rsync /media/My\ Passport/
The place for the improvement would appear to be in this snipped of /etc/bash_
_umount()
{
local cur IFS=$'\n'
COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- "$cur" ) )
return 0
}
complete -F _umount $dirnames umount
... but I don't know what it would be or I'd write and include a patch.
Tony
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: bash-completion 1:1.1-3ubuntu2
ProcVersionSign
Uname: Linux 2.6.32-24-generic i686
NonfreeKernelMo
Architecture: i386
Date: Tue Oct 5 22:20:03 2010
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
PackageArchitec
ProcEnviron:
PATH=(custom, no user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: bash-completion
I am unable to reproduce this bug on a Maverick amd64 system running bash 4.1-2ubuntu4 and bash-completion 1:1.2-2ubuntu1.
When you type "umount /media/My" (with no trailing space) and then press tab, does it do nothing, or does it add an unescaped trailing space? If it appends a space (without a backslash), then I think this should be considered a bug, and not just a wishlist item.