bug-bash
[Top][All Lists]
Advanced

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

Re: why is dash confused with underscore in autocompletion?


From: L A Walsh
Subject: Re: why is dash confused with underscore in autocompletion?
Date: Wed, 30 May 2018 15:58:55 -0700
User-agent: Thunderbird



Chet Ramey wrote:
Linda: it's a readline option. It's off by default. You turned it on
somewhere in your environment. If you don't like the behavior, find out
where you enabled it and turn it off again.
---
I find the man page wrong or misleading w/r/t the map-case option:

   If  set  to  On, and completion-ignore-case is enabled, readline
   treats hyphens (-) and underscores (_) as equivalent  when  per-
   forming case-insensitive filename matching and completion.

readline does NOT treat hyphen and underscore as equivalent when
performing  case-insensitive filename matching and completion.
I know, now, that the 'if' condition is meant to apply to the 2nd phrase
above, but it has a 'syntax error'.  I'm pretty sure that the 2nd
phrase needs a subordinating 'then' before readline. Otherwise the relation of the first 2 clauses (If..., and...,) is
unclear.  I'm not sure where readline does 'matching' that isn't
part of completion (not saying it doesn't exist, just can't think
of any examples off hand).

I feel that paragraph would be more clear if its effects were
spelled out:

   If set to On, readline adds the characters hyphen (-) and
   underscore (_) as a case variation when doing case-insensitive
   filename matching and completion.  This mapping doesn't affect
   bash's idea of case difference, for example, not in upper (-u)
   and lower (-l) case variable declare's nor features affected by
   the options 'nocaseglob' and 'nocasematch'.




reply via email to

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