Here's a couple of configuration tweaks:
~/.inputrc
:
"\C-[[A": history-search-backward
"\C-[[B": history-search-forward
This works the same as ^R
but using the arrow keys instead. This means I can type (e.g.) cd /media/
then hit up-arrow to go to the last thing I cd
'd to inside the /media/
folder.
(I use Gnome Terminal, you may need to change the escape codes for other terminal emulators.)
Bash completion is also incredibly useful, but it's a far more subtle addition. In ~/.bashrc
:
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
This will enable per-program tab-completion (e.g. attempting tab completion when the command line starts with evince
will only show files that evince can open, and it will also tab-complete command line options).
Works nicely with this also in ~/.inputrc
:
set completion-ignore-case on
set show-all-if-ambiguous on
set show-all-if-unmodified on