[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

completion hosed by :

From: Ilya N. Golubev
Subject: completion hosed by :
Date: Thu, 24 Aug 2006 21:16:04 +0400

Version: 3.1.

If user enters unescaped `:' in command line so that the word already
input constitutes prefix of some existing file names, and invokes
`complete' (<TAB>), what happens can not even be interpreted as
provision for colon separated file name lists like `PATH' value.  If
`0:0', `0i', `0.tar' files exists in current directory, `0:' is
completed with `0\:0' to obtain `0:0\:0'.  If 1st `:' is a file name
separator, the file name prefix to complete is empty, all files in
current directory must be considered for completion.  If `:' is part
of file name, it should be completed with `0', and optionally escaped
to distinguish from file name separator.  To obtain `0:0' or `0\:0'.

It is certainly better than previous versions did, to consider
existing file names with `:'.  If file names are included in colon
separated list, they do not contain colons themselves.  Also, file
names obtained from them by appending colon and more text normally do
not exist.  So the cases of colon separated lists and file names
containing colons may be easily distinguished.  If entered word
constitutes prefix of some existing file names, it is file name
prefix, even if it contains colons, should be completed as such, and
colons may optionally be escaped.  If no such file names exist, but
string starting from last colon in the word consititutes existing file
name prefix, the word is colon separated list, and last item of the
list should be completed.

Certainly modifying prefix already entered, to escape colons,
increasing its size, may be tedious to implement.

The very interpretation of `:' in file name completion in any special
way is not documented in `bashref.texi' at all.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]