There are a bunch of important stty settings that should be set, most get set by default. One that sometimes doesn't is
stty erase ^HIf you have ever been trying to delete characters on the command line with backspace, or when you try to backspace in less or more, and all you see is a whole bunch of ^H^H^H^H^H, this stty setting isn't set.
Another super cool one that I just found stty very useful for was in the mysql client. I instinctively would press ctrl-C to cancel a command, in the mysql client, this issues the quit command. So, undaunted, I just did the following, which emulates pretty closely the behaviour I really want:
stty intr ^t stty kill ^cThis resets the Interrupt signal (intr) to a key I don't use very much, ctrl-t, and sets ctrl-c to kill, which deletes the current line.
Neat, eh?
No comments:
Post a Comment