xm bash completion interacts poorly with bash aliases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xen-tools (Ubuntu) |
Fix Released
|
Undecided
|
Axel Beckert |
Bug Description
Binary package hint: xen-tools
alex@borobudur ~ [01:40] $ lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
alex@borobudur ~ [01:40] $ apt-cache policy xen-tools
xen-tools:
Installed: 3.9-6
Candidate: 3.9-6
Version table:
*** 3.9-6 0
500 http://
100 /var/lib/
3.8-4ubuntu4 0
1 http://
What I tried:
sudo xm create vmna<tab>
What I got:
sudo xm create vmname.cfg@
What I expected to get:
sudo xm create vmname.cfg
I have "alias ls='ls -F --color=tty'" in my dotfiles, so the tab-completion was including the @ that marks the file as a symlink. I think this can be resolved by using /bin/ls instead of just ls in the bash_completion script:
--- /etc/bash_
+++ /etc/bash_
@@ -41,7 +41,7 @@
return 0
;;
create)
- local names=$(for x in `ls -1 /etc/xen/*.cfg 2>/dev/null`; do echo ${x/\/etc\/xen\//} ; done )
+ local names=$(for x in `/bin/ls -1 /etc/xen/*.cfg 2>/dev/null`; do echo ${x/\/etc\/xen\//} ; done )
return 0
;;
This bug will be fixed with xen-tools version 4.2 since the completion features have been removed from the Debian package because the bash-completion package offers a more complete feature set.