& quot;在& quot;上设置完成-忽略情况在〜/.inputrc中被忽略 [英] "set completion-ignore-case on " ignored in ~/.inputrc

查看:69
本文介绍了& quot;在& quot;上设置完成-忽略情况在〜/.inputrc中被忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的〜/.inputrc 中设置 completion-ignore-case on ,但是该选项似乎被忽略了.当我点击选项卡时,仅显示区分大小写的匹配项.

I'm attempting to set completion-ignore-case on in my ~/.inputrc, but the option seems to be ignored. When I hit tab, only case-sensitive matches are shown.

这是我的〜/.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 正在被阅读,但是 completion-ignore-case 被某种程度上忽略了.

Oddly enough, the history-search-backward and -forward settings do work, so ~/.inputrc is getting read, but completion-ignore-case is getting ignored somehow.

运行 bind"setcomplete-ignore-case on" 会产生预期的行为.我还尝试了 set -在〜/.inputrc 中设置其他变量,它们也可以正常工作.

Running bind "set completion-ignore-case on" yields the expected behavior. I also tried set-ing other variables in ~/.inputrc and they also worked fine.

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

I'm running MacOS 10.12.4 and bash 4.4.12(1)-release (installed via homebrew).

推荐答案

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

Try to remove the comment. This seems to make it work for me.

# 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.

这篇关于& quot;在& quot;上设置完成-忽略情况在〜/.inputrc中被忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆