Public bug reported:

Binary package hint: xen-tools

a...@borobudur ~ [01:40] $ lsb_release -rd
Description:    Ubuntu 9.04
Release:        9.04
a...@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://us.archive.ubuntu.com jaunty/universe Packages
        100 /var/lib/dpkg/status
     3.8-4ubuntu4 0
          1 http://us.archive.ubuntu.com hardy/universe Packages

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_completion.d/xm.orig      2009-11-17 01:32:45.000000000 -0800
+++ /etc/bash_completion.d/xm   2009-11-17 01:33:01.000000000 -0800
@@ -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 )
            COMPREPLY=( $(compgen -W "${names}" -- ${cur}) )
             return 0
             ;;

** Affects: xen-tools (Ubuntu)
     Importance: Undecided
         Status: New

-- 
xm bash completion interacts poorly with bash aliases
https://bugs.launchpad.net/bugs/484098
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to