Search through bash history
After typing something, you can push "up arrow" and see filtrated history
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
git branch
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
NO_COLOR="\[\033[0m\]"
PS1="$GREEN\u@\h$NO_COLOR:\w$YELLOW\$(parse_git_branch)$NO_COLOR\$ "
Adding counter and timestamp to bash history
export HISTTIMEFORMAT="%F %T "
more:
https://pastuszko.net/paco/index.php/do.get/item.52/