[Bug 655488] Re: wishlist: bash completion could do better with umount with spaces

Lekensteyn 655488 at bugs.launchpad.net
Thu Oct 6 17:07:31 UTC 2011


*** This bug is a duplicate of bug 382037 ***
    https://bugs.launchpad.net/bugs/382037

** This bug has been marked a duplicate of bug 382037
   Bash-completion fails to parse spaces for umount

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to bash-completion in Ubuntu.
https://bugs.launchpad.net/bugs/655488

Title:
  wishlist: bash completion could do better with umount with spaces

Status in “bash-completion” package in Ubuntu:
  New

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,nodev,uhelper=udisks,uid=1999,gid=1999,shortname=mixed,dmask=0077,utf8=1,flush)
  # 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_completion:

       _umount()
      {
          local cur IFS=$'\n'

          COMPREPLY=()
          cur=`_get_cword`

          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
  ProcVersionSignature: Ubuntu 2.6.32-24.41-generic 2.6.32.15+drm33.5
  Uname: Linux 2.6.32-24-generic i686
  NonfreeKernelModules: wl
  Architecture: i386
  Date: Tue Oct  5 22:20:03 2010
  InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, no user)
   LANG=en_US.utf8
   SHELL=/bin/bash
  SourcePackage: bash-completion

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/655488/+subscriptions




More information about the foundations-bugs mailing list