Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14164

why is dash confused with underscore in autocompletion?

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 why is dash confused with underscore in autocompletion?
Date Tue, 29 May 2018 14:32:51 -0700
Lines 38
Approved bug-bash@gnu.org
Message-ID <mailman.738.1527629584.1292.bug-bash@gnu.org> (permalink)
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 1527629585 29705 208.118.235.17 (29 May 2018 21:33:05 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash <bug-bash@gnu.org>
Envelope-to bug-bash@gnu.org
User-Agent Thunderbird
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:14164

Show key headers only | View raw


I have 4 files in a dir:

  remove-oldver-rpms-in-dir.pl
  remove_mounted_lv
  remove_multiples
  remove_nocase_dupfonts

When I do autocomplete:

  > ls remo<TAB>                # I get all 4 files listed:
  remove-oldver-rpms-in-dir.pl* remove_mounted_lv*
  remove_multiples*             remove_nocase_dupfonts*
  > ls remove                   # and 'remo' is extended to 'remove'

(fine so far)

then I add a dash (or minus), '-' and hit <TAB> again.

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.

But there isn't. Indeed, adding a '*' after the dash and ENTER, and
ls shows only 1 file.

Is there some setting I've forgotten I've set that is enabling this
behavior?  I can't think of why I'd want it, since I really do want
it to complete the 1st filename.  It also doesn't limit the words to
ones w/underscore after 'remove' if I add '_', it still lists
'remove-old...' as a completion option.

So why is this happening and how can I turn it off?

Thanks!


Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

why is dash confused with underscore in autocompletion? L A Walsh <bash@tlinx.org> - 2018-05-29 14:32 -0700

csiph-web