[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash: ":?xxx" filename broken on autocomplete
From: |
Chet Ramey |
Subject: |
Re: bash: ":?xxx" filename broken on autocomplete |
Date: |
Sun, 28 Apr 2024 13:36:06 -0400 |
User-agent: |
Mozilla Thunderbird |
On 4/27/24 5:28 PM, Gioele Barabucci wrote:
Control: found -1 5.2.21-2
On Tue, 27 Aug 2019 16:36:03 +0200 Philipp Marek <philipp@marek.priv.at>
wrote:
the autocompletion is broken on filenames or directories with ":?" at the
beginning.
# mkdir ':?aa'
# rmdir :<tab>
gives me
# rmdir :\:\?
which doesn't match the filename; I can finish completion by entering
"aa", but then "rm" rejects this name.
In bash 5.2.21(1) the filename is now fully completed, but the stray ":" at
the beginning is still produced:
$ mkdir ':?aa'
$ rmdir :<TAB>
$ rmdir :\:\?aa/
`:' is one of the characters in the default value of COMP_WORDBREAKS, which
is how bash exposes the set of characters readline uses to break words for
completion.
The word being completed here is "". If you want to complete a filename
starting with `:', quote it with a backslash.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature