From: Jannik ZANDER Date: Mon, 9 Jul 2018 20:18:42 +0000 (+0200) Subject: Bash minor update X-Git-Url: https://git.zndr.dk/?a=commitdiff_plain;h=d94edb8c7e48466be54c2b3f9b15cab5b4c47d5f;p=dotfiles.git Bash minor update --- diff --git a/.bashrc b/.bashrc index 4218e8b..b54f68f 100644 --- a/.bashrc +++ b/.bashrc @@ -4,6 +4,7 @@ [[ -z "$PS1" ]] && return cd ~ + set -o vi # Use 'help shopt' to see the documentation for the given options @@ -32,28 +33,20 @@ PS1="$PS1"'\[\033[31m\]' # change color PS1="$PS1"'$(__git_ps1 "(%s)")' # bash function (no spaces) PS1="$PS1"'\[\033[00m\]' # change color PS1="$PS1"'\$ ' # prompt -export PS1 - -export GIT_PS1_SHOWDIRTYSTATE=1 -export GIT_PS1_SHOWUNTRACKEDFILES=1 -export GIT_PS1_SHOWSTASHSTATE=1 -export GIT_PS1_SHOWUPSTREAM="auto" -export GIT_PS1_HIDE_IF_PWD_IGNORED=1 - -# Whenever displaying the prompt, write the previous line to disk -export PROMPT_COMMAND="history -a;" - -# History control: -# - ignorespace: lines which begin with a space character are not saved -# - ignoredups: lines matching the previous history entry are not saved -# - erasedups: all previous lines matching the current line are removed before -# the new line is saved -export HISTCONTROL=ignorespace:ignoredups:erasedups -export HISTIGNORE="ll:ls:cd:cd -:pwd:exit:date:* --help"; - -# Unlimited history -export HISTFILESIZE= -export HISTSIZE= + +GIT_PS1_SHOWDIRTYSTATE=1 +GIT_PS1_SHOWUNTRACKEDFILES=1 +GIT_PS1_SHOWSTASHSTATE=1 +GIT_PS1_SHOWUPSTREAM='auto' +GIT_PS1_HIDE_IF_PWD_IGNORED=1 + +# Set unlimited history +HISTFILESIZE= +HISTSIZE= +HISTCONTROL=ignoreboth:erasedups +HISTTIMEFORMAT="[%F %T] " +HISTFILE=~/.bash_history.local +PROMPT_COMMAND="history -a; $PROMPT_COMMAND" # Load completion, aliases, and local [ -f /etc/bash_completion ] && . /etc/bash_completion