"在"上设置完成 - 忽略 - 案例在〜/ .inputrc中被忽略

时间:2017-03-29 19:13:03

标签: bash macos readline

我试图在completion-ignore-case on中设置~/.inputrc,但该选项似乎被忽略了。当我点击标签时,只显示区分大小写的匹配。

这是我的~/.inputrc

# Bash input configuration
set completion-ignore-case on     #Enable case-insensitive tab-complete
"\e[A": history-search-backward   #Press up or down arrow to search through shell history on what you've already typed
"\e[B": history-search-forward

#"\e[1;9C": forward-word          #alt-left/right to move the cursor by words
#"\e[1;9D": backward-word         #I prefer to enable this in iTerm settings so it works no matter where I'm ssh'd to.

奇怪的是,history-search-backward-forward设置执行有效,因此~/.inputrc 正在阅读,但是{{1以某种方式被忽略了。

运行completion-ignore-case会产生预期的行为。我还尝试了bind "set completion-ignore-case on" set中的其他变量,它们也运行良好。

我正在运行MacOS 10.12.4和bash 4.4.12(1)-release(通过自制软件安装)。

1 个答案:

答案 0 :(得分:5)

尝试删除评论。这似乎使它对我有用。

# Bash input configuration
set completion-ignore-case on
"\e[A": history-search-backward   #Press up or down arrow to search through shell history on what you've already typed
"\e[B": history-search-forward

#"\e[1;9C": forward-word          #alt-left/right to move the cursor by words
#"\e[1;9D": backward-word         #I prefer to enable this in iTerm settings so it works no matter where I'm ssh'd to.