1

under the latest macos

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.15.6
BuildVersion:   19G73

i am using the latest bash (installed via brew)

$ $SHELL --version
GNU bash, version 5.0.18(1)-release (x86_64-apple-darwin19.5.0)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

and bash is defined as the default shell (chsh -s /usr/local/bin/bash + reboot)

$ which $SHELL
/usr/local/bin/bash

$ cat /etc/shells | tail -n 1
/usr/local/bin/bash

to customize bash, i have ~/.inputrc

$ ls -l ~/.inputrc
-rw------- 1 foo staff 1432 Jan 21  2020 /Users/foo/.inputrc

that holds the following

set completion-ignore-case on
"\e[B": history-search-forward
"\e[A": history-search-backward

i used to be able to reverse-search using case-insensitive, but now it stopped working.

even tried to run set completion-ignore-case on and bind 'set completion-ignore-case on' directly in the terminal but it did not solve my issue.

  1. is there a bug in the bash version that i am using?
  2. how can i tell whether bash honors ~/.inputrc?
  3. how do you recommend to debug the issue?
4
  • Are you sure that you are running bash ?? - with macOS 10.15 the default is now zsh - which can be change back to bash – Rene Larsen Jul 29 '20 at 14:07
  • @HighPerformanceMark: it does, please see my update to the question – Mr. Jul 29 '20 at 14:28
  • @ReneLarsen: 100% sure, please see my update to the question – Mr. Jul 29 '20 at 14:32
  • What does "stopped working" mean? The key combination does not pop the search? It doesn't find anything? What key do you have ESC-[-B bound to in the keyboard profile? By default it's the up-arrow on the keyboard. If you prefix hitting the key with ^V, does the shell display what you would expect? What terminal are you using? – Marc Wilson Jul 29 '20 at 15:27
0

after examining the issue under linux, i realized that the issue is not macos specific.

searching the internet harder, i found the solution

you can't get this feature in BASH at present because this feature hasn't been built yet into vi or emacs mode. As I commented above completion-ignore-case only applies to completion, not to isearch

~10 years after the accepted answer, it seems that it is still the case.

references:

1
  • 2
    Which statement flies in the face of what you claimed above... "i used to be able to reverse-search using case-insensitive, but now it stopped working", so which is it? – Marc Wilson Jul 29 '20 at 15:48
0

SOLVED! macOS Catalina version: 10.15.7

According to the readline manual, ~/.inputrc should essentially, auto-initialize by bash.

This didn't initially work for me. What finally worked was adding the bind -f ~/.inputrc to ~/.bash_profile. Also, remember to install readline using brew install readline

I also tried without success:

  1. Upgrading to bash 5 using brew - did Not auto-initialize ~/.inputrc
  2. Compiling locally a version of bash5 using brew install --HEAD bash - did Not work
  3. Adding the bind command to ~/.bashrc - did not work on bash3 or bash5

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .