【问题标题】:"show-all-if-ambiguous" not working. Help please?\"show-all-if-ambiguous\" 不工作。请帮忙?
【发布时间】:2023-01-27 19:37:30
【问题描述】:

我正在尝试让“glob-expand-word”工作

pi@raspberrypi:~ $ cat .inputrc
set editing-mode vi
set keymap vi
set show-all-if-ambiguous on
Control-o: "> output"
pi@raspberrypi:~/tmp/test4 $ ls
total 8.0K
drwxr-xr-x 10 pi pi 4.0K Jan 27 08:48 ..
-rw-r--r--  1 pi pi    0 Jan 27 08:48 3_eng
-rw-r--r--  1 pi pi    0 Jan 27 08:48 2_eng
-rw-r--r--  1 pi pi    0 Jan 27 08:48 1_eng
drwxr-xr-x  2 pi pi 4.0K Jan 27 08:48 .
pi@raspberrypi:~/tmp/test4 $ ls *eng^X

尝试执行 ctrlx, * (a two stroke combo) 时它不起作用 -
而不是自动完成和输出"ls 1_eng 2_eng 3_eng"而是附加^X

请问有什么建议吗?

【问题讨论】:

  • 您确定.inputrc 是正确的位置吗?这个文件配置一般阅读线任何想要使用的程序的行为阅读线(例如,ftp),他们不一定知道 filenam 完成。相反,我在 .bashrc 中有命令,它在那里运行良好。但是,我有此外set show-all-if-unmodified on 还有。

标签: bash readline tab-completion


【解决方案1】:

尝试绑定 ctrl-x :

bind '"C-x": glob-list-expansions'
# Then -> ls *eng^X

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-28
    • 1970-01-01
    • 1970-01-01
    • 2018-01-07
    相关资源
    最近更新 更多