Monday, October 11, 2010

GNU Readline Vi Mode Visualization

GNU readline provides possibility to use VI editing mode rather than standard EMACS one. Based on the VI editor it means that we have two distinct modes while editing a line and a way of switching between them. Insert mode for inserting text and command or normal mode for applying commands on the current line. Of course the key bindings for modes are separated. In terms of readline the key bindings specific to some editing mode are recognized as 'keymap'. After specifying the keymap like 'set keymap vi-insert' any key binding you specify will apply to selected keymap. See my GNU Readline post for details.

Sunday, October 10, 2010

Bash Tweaks

Some useful bash tweaks. It's no surprise that they're placed in '~/.bashrc' file.

GNU Readline

GNU readline is a library providing in most simplified explanation functionality for interactive input line editing. On top of that it provides features like:

Saturday, October 9, 2010

Screen, Tmux and 256 colors

Text terminal application can find out terminal type connected by consulting environment variable TERM. You should make sure that your terminal (most likely terminal emulator) will set TERM variable to the correct value.

Wednesday, October 6, 2010

Terminal Escape Sequences

I went across this topic some time ago. The point is that text terminal can (and usually does) support / implement several so called escape sequences. They are called escape because they start with the escape character. There is bunch of escape sequences (standard and non-standard too) for all kind of fancy stuff you can do on the text terminal (moving the cursor, deleting, inserting, changing text attribute like color and so on).