Quantcast
Channel: Planet Ubuntu
Viewing all articles
Browse latest Browse all 17727

Dougie Richardson: Bash

$
0
0

Two things that improve my bash productivity – stopping the cursor keys inserting characters in vim and history search in bash.

Edit ~/.vimrc or /etc/vim/vimrc (for system wide) and add turn off vi compatibility:

set nocompatible

The latter can be improved by editing ~/.inputrc (or /etc/inputrc for everyone). Pressing the up key scrolls through all the commands you’ve typed but by adding:

"\e[A":history-search-backward
"\e[B":history-search-forward

You can type the first letter or two and get the command you need, so if you typed “mysql -u root -p” last Tuesday but can’t remember the options, typing “my” and pressing the up key will find it.

Related Posts

  1. Vim
  2. Firefox 3.x hanging on Aspire One
  3. Watch TV with VLC and a Freecom DVB-T Stick

Viewing all articles
Browse latest Browse all 17727

Trending Articles