[Top][All Lists]

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

hyphens (-) and underscores (_) are not treated as equivalent with compl

From: awa54
Subject: hyphens (-) and underscores (_) are not treated as equivalent with completion-map-case and completion-ignore-case enabled
Date: Tue, 19 Jan 2021 14:30:46 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' -DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS uname output: Linux w-arch 5.10.7-arch1-1 #1 SMP PREEMPT Wed, 13 Jan 2021 12:02:01 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

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

But neither

$ ./-t<TAB>
$ ls -t<TAB>


If I turn off progcomp with `shopt -u progcomp` (as suggested here https://unix.stackexchange.com/questions/629844/bash-completion) it allows the `ls` example to complete but not the other.

reply via email to

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