Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux .inputrc超越控制+;W_Linux_Unix_Readline_Stty - Fatal编程技术网

Linux .inputrc超越控制+;W

Linux .inputrc超越控制+;W,linux,unix,readline,stty,Linux,Unix,Readline,Stty,如何在.inputrc中覆盖bash中的Control+W?以下内容本身不起作用: "\C-w": forward-word 当我添加stty-werase-undf时,确实起作用,但是“s”键被神秘地禁用了 您需要在.inputrc文件中使用选项将bind tty special chars设置为Off,以便像这样绑定^W。原因是: 从版本5.0开始的Readline读取stty特殊字符 设置并每次将其绑定到其读线等效项 调用readline() 在5.1中引入了bind tty speci

如何在.inputrc中覆盖bash中的Control+W?以下内容本身不起作用:

"\C-w": forward-word

当我添加
stty-werase-undf
时,确实起作用,但是“s”键被神秘地禁用了

您需要在
.inputrc
文件中使用选项
将bind tty special chars设置为Off
,以便像这样绑定
^W
。原因是:

从版本5.0开始的Readline读取stty特殊字符 设置并每次将其绑定到其读线等效项 调用readline()

在5.1中引入了
bind tty special chars
选项,以解决此功能。-搜索选项

set bind-tty-special-chars Off
"\C-w": forward-word
稍旧的学校方法包括
.bashrc
如下:

stty erase undef
bind '"\C-w": forward-word'