[英]How can I configure the “delete” key to delete a word in c shell
I tried to do "stty werase [3~", "stty werase ^H" " stty werase ^?" 我尝试做“ stty werase [3〜”,“ stty werase ^ H”,“ stty werase ^?”。 , but nothing has helped.
,但没有任何帮助。 Do you have any idea how to configure the DEL / delete key to delete a word in c shell?
您是否知道如何配置DEL / Delete键以删除c shell中的单词?
Thanks, 谢谢,
If you're using tcsh rather than csh, this should work: 如果您使用的是tcsh而不是csh,则应该可以:
bindkey '^[[3~' backward-delete-word
I don't think stty
can map multi-character sequences, but you might be able to configure your terminal emulator so that Delete sends an ASCII DEL character. 我认为
stty
不能映射多字符序列,但是您可以配置终端仿真器,以便Delete发送ASCII DEL字符。 In xterm, right-click and enable the "Delete is DEL" option, or set the X resource: 在xterm中,右键单击并启用“ Delete is DEL”选项,或设置X资源:
XTerm*deleteIsDEL: True
You can then use 然后,您可以使用
stty werase '^?'
(the single quotes aren't actually necessary). (单引号实际上不是必需的)。 Other terminal emulators should also have some mechanism to cause Delete to send ASCII DEL.
其他终端仿真器也应具有某种机制,以使Delete发送ASCII DEL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.