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

Rgrds,

About Chris Gralike

Momenteel ben ik manager van de afdeling business continuity bij de zakelijke IT dienstverlener AMIS Services BV. Sinds 2003 ben ik actief in de ICT branche. Tussen 2003 en nu heb ik verschillende rollen vervuld. In de rollen: systeem- en netwerkbeheer, system engineer, servicemanager en nu practice manager ben ik in contact gekomen met uiteenlopende technologieën, methodologieën, ideeën, oplossingen en innovaties. Een rijke ervaring waarmee ik de klanten van Conclusion en AMIS elke dag probeer te ondersteunen. Mijn credo: 'Altijd opzoek een win-win tussen business en technologie.'

Posted on December 10, 2009, in Linux, Linux Commands, Tooling and tagged , , , , , , , , , , , , , , , , , . Bookmark the permalink. Leave a comment.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: