3 ms·
bash Nothing special in my .bashrc, just whatever came with lubuntu. Here are the only interesting tweaks. The prompt is two lines, first line = $? from the pr
by antidoh 14y ago
bash
Nothing special in my .bashrc, just whatever came with lubuntu. Here are the only interesting tweaks. The prompt is two lines, first line = $? from the previous command, then some normal stuff; second line is whatever you type for a command, allows triple clicking and just get the command with no prompt cruft.
...
if [ "$color_prompt" = yes ]; then
PS1="\[\033[01;32m\]\$?] ${debian_chroot:+($debian_chroot)}\[\033[01;34m\]\u\[\033[01;32m\]@\h\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\] \$\n"
else
PS1="\$?] ${debian_chroot:+($debian_chroot)}\u@\h \w \$\n"
fi
unset color_prompt force_color_prompt
...
export PAGER=~/bin/vimpager
My .inputrc, allows any readline enabled prog like pgsql to have command line editing and completion:
set editing-mode vi
set completion-ignore-case on
Control-j: menu-complete
Control-k: menu-complete-backward
set completion-map-case on
In general, don't use set -o vi on the cmd line or in .bashrc, use .inputrc so that everyone who can play does play.