Personal Memo – Make delete and others function in a terminal.
Set the terminal delete backspace and such using the stty command. On some linux distros these are not defined by default and might be needed to work inside the terminal. Behind the -More- the so called stty commands for erase, kill and other terminal functions…
stty erase ^\? #erases the last character (Delete) stty kill ^u # erases an entire line (Ctr + u) stty werase ^w # Erase last word (Ctr + w) stty intr ^c # Terminates a job (Ctr + c) stty quit ^\\ # Terminates a job and creates a core file (Ctr + \) stty susp ^z # Stops current job (Ctr + z) stty rprnt ^r # Redisplays the current line (Ctr + r)
You might be able to script this using the .profile | /etc/profile file. It might look somewhat like;
if [ $CVS_RSH -eq "ssh" ]; then stty erase ^\? stty kill ^u .... fi
Posted on December 10, 2009, in Linux, Linux Commands, Tooling and tagged and, Command, dek, erase, intr, kill, Linux, other, others, profile, quit, set, shell, stty, Terminal, user, Using, werase. Bookmark the permalink. Leave a comment.