[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Filename completion causes doubling of initial ':' character
From: |
L A Walsh |
Subject: |
Re: Filename completion causes doubling of initial ':' character |
Date: |
Sun, 04 Dec 2016 17:14:25 -0800 |
User-agent: |
Thunderbird |
Chet Ramey wrote:
The short answer is that colon is special to readline: it breaks words for
the readline completion code. If you want to complete filenames beginning
with a colon, either quote the colon or remove colon from
$COMP_WORDBREAKS.
If you're using bash-completion, it may have its own problems with colons.
Various programs I've run across have ways to specify what characters
should be "allowed" as includeable in identifiers, filenames and/or variable
names, etc. Ex. for the command line of Windows in cmd.exe, and, I believe
before that, in command.com, a value in the registry held the value of
characters to 'break' completion on for interactive use as well as
for word selection in mount selection. Additionally some terminal emulators
that support select (for copy/paste) also support such a list.
Does readline have any config element in .inputrc to allow specifying
what the word-break characters are as 'isearch-terminators' can specify
a list of characters that terminate an incremental search or IFS specifies
a list of characters that will be used to split a line into words?
Maybe 'word-breaking-chars' (and/or an env-based solution of something like
"BASH_WBC")? The latter might be usable to propagate a "Terminal's"
setting to a spawned program like bash or through 'ssh' to a remote
login shell.
Is that something that might be added-to or considered-for BASH (if it isn't
already doable in some way?)
-l