inputrc가 올바르게 로드되지 않았습니다.

inputrc가 올바르게 로드되지 않았습니다.

내 항목에 다음을 추가했습니다 ~/.inputrc.

set show-all-if-ambiguous on   # single tab to start completion help
set completion-ignore-case on  # completion is case-insensitive

$include /etc/inputrc

다음을 실행하면 strace bash로드된 것을 볼 수 있습니다 .

stat("/home/john/.inputrc", {st_mode=S_IFREG|0644, st_size=156, ...}) = 0
open("/home/john/.inputrc", O_RDONLY)   = 3
read(3, "set show-all-if-ambiguous on   #"..., 156) = 156
close(3)                                = 0
stat("/etc/inputrc", {st_mode=S_IFREG|0644, st_size=714, ...}) = 0
open("/etc/inputrc", O_RDONLY)          = 3
read(3, "# do not bell on tab-completion\n"..., 714) = 714
close(3)           

                 = 0

반면:

$ ls ~
Projects    Pictures

새로운 bash 창에서는 cd p<TAB>결과가 생성되지 않습니다 .

하지만, 다음을 입력하면 bind 'set completion-ignore-case on'폴더가 모두 나열되고 예상대로 대소문자가 변경됩니다.

내가 여기서 무엇을 놓치고 있는 걸까요?

편집하다:

/etc/inputrc는 수정되지 않았으며 다음을 포함합니다:

# do not bell on tab-completion
#set bell-style none

set meta-flag on
set input-meta on
set convert-meta off
set output-meta on

$if mode=emacs

# for linux console and RH/Debian xterm
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[7~": beginning-of-line
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
"\e[1;5C": forward-word
"\e[1;5D": backward-word

# for rxvt
"\e[8~": end-of-line

# for non RH/Debian xterm, can't hurt for RH/DEbian xterm
"\eOH": beginning-of-line
"\eOF": end-of-line

# for freebsd console
"\e[H": beginning-of-line
"\e[F": end-of-line
$endif

답변1

inputrc지원 되는 것 같지만 # comments자체 라인에서만 지원되며 후행에는 없습니다. 각 문 뒤에는 # comment해당 문을 적용하지 못하게 만드는 문이 나옵니다.

set show-all-if-ambiguous on
set completion-ignore-case on

예상대로 작동하는 것 같습니다.

관련 정보