xm bash completion interacts poorly with bash aliases

Bug #484098 reported by Alex Dehnert
6
This bug affects 1 person
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://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
             ;;

Related branches

Revision history for this message
Axel Beckert (xtaran) wrote :

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.

Changed in xen-tools (Ubuntu):
assignee: nobody → Axel Beckert (xtaran)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (21.9 KiB)

This bug was fixed in the package xen-tools - 4.2.1-1

---------------
xen-tools (4.2.1-1) unstable; urgency=low

  * New upstream release
    - Fixes bashism in "editor" roles script. Thanks Raphaël Halimi for
      the patch! (Closes: #605203)
    - Fixes missing architecture check in Sarge amd64 special case. Thanks
      to Guillaume Pernot! (Closes: #611397) Also changes default Sarge
      amd64 mirror to http://archive.debian.org/debian-amd64/.
    - Allows --ip=auto again (Closes: #611407)
    - Unmounts /proc and /dev/pts of the freshly installed DomU just
      before unmounting the disk image. (Closes: #588783)

xen-tools (4.2-1) unstable; urgency=low

  * New upstream release
    - Fixes several cases of broken or incomplete config files with
      unexpected or seldom parameter combinations. (Closes: #484652)
    - Updates examples in /etc/xen-tools.conf to better reflect current
      state
    - Allows usage of xvc* as serial console as used as default by older
      Xen versions.
    - Preliminary support for Ubuntu 11.04 (Natty) and Debian 7.0 (Wheezy)
      (Closes: #597521)
    - Switches default mirror for EoL'ed Ubuntu 8.10 (Intrepid) and Debian
      4.0 (Etch) to the distributions' archives for old releases.
  * Does no more try extract the upstream changelog during debian package
    build. The commit which introduced this problem has been reverted.
    Document more clearly in debian/README.source how to build the package
    from a checked out copy of the git repository, especially that the
    upstream changelog has to be generated first out of the VCS log.
    (Closes: #595883)
  * Update debian/copyright: Add Stéphane Jourdois to list of authors.

xen-tools (4.2~rc1-1) unstable; urgency=low

  [Axel Beckert]
  * New upstream release candidate
    - Uses GeoIP for Debian mirrors: Default Debian mirror is now
      cdn.debian.net, see http://wiki.debian.org/DebianGeoMirror for
      details.
    - Uses the same 15-disable-hwclock hook for Debian as for Ubuntu DomUs
      (Closes: #588880)
    - Mounts not only /proc but also /dev/pts automatically before running
      any customisation hooks (Closes: #588783)
    - Uses apt-config to parse Dom0's apt.conf. (Closes: #560011)
    - Fixes wrong loop module parameter syntax in warning. Thanks to
      Daniel Baumann for spotting this. (Closes: #516902)
    - With --verbose, the output of commands called by xen-tools
      (e.g. debootstrap) is not only logged, but also printed to
      STDOUT. (Closes: #513126)
    - Adds btrfs support.
  * Bump Standards-Version to 3.9.1 (no changes)

  [Stéphane Jourdois]
  * [debian/control] Suggest btrfs-tools

xen-tools (4.2~beta1-1) unstable; urgency=low

  * New maintainer and upstream authors
  * Reintroduction into Debian Unstable (Closes: #566714)
  * New upstream beta version
    - Needs dependency on libfile-slurp-perl
    - Supports for more recent versions of Fedora, Ubuntu and Debian
      (Closes: #499477)
    - Supports pygrub. (Added "Suggests: xen-utils" to debian/control)
    - Uses hvc0 and xvda devices by default
    - Sets umask to 0077 before creating disk images (Closes: #548909)
    - Makes sure, MAKEDEV is fou...

Changed in xen-tools (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.