[Bash-completion-devel] completion of ':' mangles filename

David Paleino d.paleino at gmail.com
Sun May 11 13:20:02 UTC 2008


tags 377935 wontfix
thanks

Hi Reuben, hi Chris,

On Wed, 12 Jul 2006 01:36:00 +0200, Chris Moore wrote:

> Package: bash
> Version: 3.1-5
> Severity: normal
> 
> Create a file called 'abc:def':
> 
> $ touch abc:def
> 
> Type a command, and part of the filename, then hit tab:
> $ rm abc:[TAB]
> 
> The filename gets completed incorrectly:
> $ rm abc:abc\:def

On Thu, 22 Feb 2007 00:45:44 +0100, Chris Moore wrote:

> This is still a problem (ash 3.1dfsg-8), and I just noticed another way that
> it manifests itself:
> 
> I have package 'libstdc++6-doc' installed, and want to view the man page for
> std::multimap
> 
> I type:
> 
>  $ man std::multim
> 
> and hit tab, expecting it to be completed, but instead I see it completed like
> this:
> 
>  $ man std::std\:\:multimap

On Wed, 23 Jan 2008 16:36:22 +0000, Reuben Thomas wrote:

> Package: bash
> Version: 3.1dfsg-8
> Followup-For: Bug #377935
> 
> This bug is still present and annoying me most times I want to look up
> a Perl man page. Any news? Any way I can help?

":" is a special Bash character [1], and we can't do anything about that.
However, completion works just fine when not including the colon:

$ touch foo:foo
$ rm f[TAB]
$ rm foo\:foo
$ rm "f[TAB]
$ rm "foo:foo"


I believe bash-completion can't do anything in this case. So, please, if you
know there are colons in the completed name (be it a filename, or a Perl module
manpage), start it with '"', or escape the first colon. I'm sorry I can't help
any more.

Fellow developers, the usual disclaimer: I've tagged this as "wontfix", but
feel free to retag at will. I believe it might be reassigned to bash, but I'll
wait for discussion (here or on the mailing list).


Kindly,
David

[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=377935
[1] http://tldp.org/LDP/abs/html/special-chars.html#NULLREF

-- 
 . ''`.  Debian maintainer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://snipr.com/qa_page
   `-   2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20080511/5aba12be/attachment.pgp 


More information about the Bash-completion-devel mailing list