문제

I tried to do "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?

Thanks,

도움이 되었습니까?

해결책

If you're using tcsh rather than csh, this should work:

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. In xterm, right-click and enable the "Delete is DEL" option, or set the X resource:

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top