[Bug 219406] Re: bash autocomplete broken when a : is in the path

Peter Cordes peter at cordes.ca
Sat Nov 29 00:59:35 UTC 2014


/usr/share/bash-completion/bash_completion has a bunch of stuff about
treating : specially, for completing host:path in scp and similar
commands.  Spent a bit of time looking at the source of this behaviour,
but haven't found it yet.

set -x  before pressing tab, and paste that into a file to look at while
going through the code seems helpful, but it's slow going.

  There's clearly a bug, though, since either it should return all files
in the directory after trying to complete on :, or it should just work.

 You can work around the bug by \quoting the :, though.  echo \:<TAB>
works fine.

-- 
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/219406

Title:
  bash autocomplete broken when a : is in the path

Status in bash-completion package in Ubuntu:
  Triaged
Status in bash-completion package in Debian:
  Won't Fix

Bug description:
  Binary package hint: bash

  Say you have a directory that looks like so:

      user at machine:/var/log/gdm$ ls
      :0.log  :0.log.1  :0.log.2  :0.log.3  :0.log.4  failsafe.log

  and you try to view one of the files by typing

      user at machine:/var/log/gdm$ /var/log/gdm/:<TAB KEY>

  Then immediately your command line will look like so:

      user at machine:/var/log/gdm$ cat /var/log/gdm/:/var/log/gdm/\:0.log

  However, if you type

      user at machine:/var/log/gdm$ /var/log/gdm/\:<TAB KEY>

  then it will work as expected, like so:

      user at machine:/var/log/gdm$ cat /var/log/gdm/\:0.log

  Package information:

  $ apt-cache policy bash bash-completion
  bash:
    Installed: 3.2-0ubuntu16
    Candidate: 3.2-0ubuntu16
    Version table:
   *** 3.2-0ubuntu16 0
          500 http://us.archive.ubuntu.com hardy/main Packages
          100 /var/lib/dpkg/status
  bash-completion:
    Installed: (none)
    Candidate: 20060301-3ubuntu3
    Version table:
       20060301-3ubuntu3 0
          500 http://us.archive.ubuntu.com hardy/main Packages

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



More information about the foundations-bugs mailing list