[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hyphens (-) and underscores (_) are not treated as equivalent with c
Re: hyphens (-) and underscores (_) are not treated as equivalent with completion-map-case and completion-ignore-case enabled
Wed, 20 Jan 2021 09:07:46 +0100
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1
On 2021-01-19 22:32, Chet Ramey wrote:
On 1/19/21 8:30 AM, firstname.lastname@example.org wrote:
Bash Version: 5.1
Patch Level: 4
Release Status: release
man bash says:
> completion-map-case (Off)
> If set to On, and completion-ignore-case is enabled, readline
treats hyphens (-) and underscores (_) as equivalent when performing
case-insensitive filename matching and completion.
$ bind -v|grep case
set completion-ignore-case on
set completion-map-case on
So it should be enabled and when I type
$ touch _test
$ chmod +x -t<TAB>
it completes to
$ chmod +x _test
$ ls -t<TAB>
If I turn off progcomp with `shopt -u progcomp` (as suggested here
allows the `ls` example to complete but not the other.
Thanks for the report. Those two options work for filename completion, but
not command completion (the bulk of which is handled outside readline).
I'll take a look at exposing that functionality outside readline, since
it's currently part of readline's filename completion, but that will take
some time and probably require a version bump.
That's great, thank you for your efforts!