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



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s