Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14166
| Path | csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | L A Walsh <bash@tlinx.org> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: why is dash confused with underscore in autocompletion? |
| Date | Tue, 29 May 2018 16:15:28 -0700 |
| Lines | 52 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.746.1527635740.1292.bug-bash@gnu.org> (permalink) |
| References | <5B0DC703.9000203@tlinx.org> <74737bdd-031f-2b53-f5f4-1c98dfc581dc@redhat.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1527635740 412 208.118.235.17 (29 May 2018 23:15:40 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | Eric Blake <eblake@redhat.com> |
| To | bug-bash <bug-bash@gnu.org> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Thunderbird |
| In-Reply-To | <74737bdd-031f-2b53-f5f4-1c98dfc581dc@redhat.com> |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] |
| X-Received-From | 173.164.175.65 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:14166 |
Show key headers only | View raw
Eric Blake wrote:
> On 05/29/2018 04:32 PM, L A Walsh wrote:
>
>
>> I'd expect it to autocomplete the entire filename for
>> 'remove-oldver-rpms-in-dir.pl' since it is the only file with a dash
>> after 'remove', but instead, bash prompts me again as though there
>> is some ambiguity between a dash and an underline.
>>
>
> When you have case-insensitive completion, I _like_ having - and _ be
> treated as case-insensitive counterparts (at least on US keyboards,
> those two symbols are on the same key, and differ only on whether you
> used shift, the same as other case-insensitive comparisons such as b/B).
>
----
If case completion should work the way you want, then 6 and '^',
for example, should also be treated as case-differing values.
'-' and '_' are not upper/lower case variations of the other even
with respect to hex placement, like lower case being 0x20 greater
than upper case. While I certainly don't mind having an option
to include -_ as case-variations, I don't really like having it
as a standard or a default if I want it to ignore case with 'a'
vs. 'A'.
I often ignore case for filenames, as I often interact
with windows, but windows does not treat '-' and '_' as the
same character. Having bash be the one exception that considers
them to be case-variations isn't logical nor helpful as having
a rule that ignores 'case'. That doesn't preclude a separate
variable/switch for toggling the behavior.
It's not like you can define a var in bash:
declare -l foo='AAA-BBB_ccc'
and have it change dashes into underscores (or vice-versa).
The fact that bash treats it differently in different places
is another problem.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: why is dash confused with underscore in autocompletion? L A Walsh <bash@tlinx.org> - 2018-05-29 16:15 -0700
csiph-web