Sample Header Ad - 728x90

Ctrl-Backspace and Ctrl-Delete in bash

30 votes
4 answers
34128 views
Putting on Debian 8.3 stty werase '^H' or on Arch Linux 2/2016 stty werase '^?' in .bashrc (for example) makes Ctrl-Backspace delete the last word in the terminal. Still it's not the same behavior as in modern GUI applications (e.g. Firefox): It deletes the last ***whitespace***-separated word, and not the last word separated by whitespace ***or*** characters like . : , ; " ' & / ( ). Is it possible to make Ctrl-Backspace behave in the terminal similar to modern GUI applications? Also, is there any way to make Ctrl-Delete delete the word immediately before the cursor?
Asked by viuser (2724 rep)
Feb 21, 2016, 04:20 PM
Last activity: Sep 16, 2021, 12:41 PM