[Bash-completion-devel] [bash-completion-Bugs][311401] DBTS 100743: inconsistent handling of filename completion wrt colons

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Sun Jan 22 17:47:24 UTC 2012


Bugs item #311401, was changed at 2009-01-30 12:10 by Igor Murzov
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311401&group_id=100114

Status: Open
Priority: 2
Submitted By: David Paleino (hanska-guest)
Assigned to: Nobody (None)
Summary: DBTS 100743: inconsistent handling of filename completion wrt colons  
Distribution: None
Originally reported in: Debian BTS
Milestone: None
Status: None
Original bug number: 100743


Initial Comment:
From: Yann Dirson <dirson at debian.org>
To: Debian Bug Tracking System <submit at bugs.debian.org>
Subject: bash: inconsistent handling of filename completion wrt colons
Date: Wed, 13 Jun 2001 22:25:56 +0200

Package: bash
Version: 2.05-4
Severity: normal

`complete-filename' is appently taking `:' as a non-filename-component.

`possible-completions' OTOH accepts it as a filename-component char.

-> this appears to be inconsistent

-> I know that `:' is the separator for *PATH variables, but in those
variables only components stating with /, or being just ".", do make
sense.  I don't see any reason for not activating filename completion
when we're not in one of those cases.

Not having file completion with colon chars not only causes problems
with names of X sockets, but also with the pathnames used by SFS
(www.fs.net, and packages sfs-*), which are usually cut'n'pasted and
contain colons.


Anyway, `:' is definitely not a special char for the shell, despite
what I read as argument in one bugreport.  It is interpreted specially
by a number of programs and library functions, that's all.  This is
why I'd be in favor of using a new function, named
`complete-filename-in-path' or so, and bind it for example to ESC-:,
and have complete-filename do what it's name suggests it does.


----------------------------------------------------------------------

>Comment By: Igor Murzov (garik-guest)
Date: 2012-01-22 21:47

Message:
_filedir() completes filenames with colons just fine for me. If I understand the issue correctly, the problem with colons is exactly the same as with '=' -- completion works only if ':' characters are escaped. If those characters that belongs to $COMP_WORDBREAKS are not quoted, then ${COMP_WORDS[$COMP_CWORD]}* will not match expected filename and there is not much we can do with this.


----------------------------------------------------------------------

Comment By: David Paleino (hanska-guest)
Date: 2009-01-30 12:11

Message:
From: Chet Ramey <chet at nike.ins.cwru.edu>
To: doko at debian.org, dirson at debian.org
Cc: chet at po.cwru.edu
Subject: Debian Bash bug #100743
Date: Tue, 10 Jul 2001 13:23:22 -0400

The bug report says, in part,

> `complete-filename' is appently taking `:' as a non-filename-component.
> 
> `possible-completions' OTOH accepts it as a filename-component char.

possible-completions does not treat `:' as a filename component character.
It acts on exactly the same word as complete-filename.

Chet


----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311401&group_id=100114



More information about the Bash-completion-devel mailing list