diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-21 16:14:33 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-21 16:14:33 -0400 |
commit | c5fb55843c66f1ff6d4491009d9cf9781c0a3d7f (patch) | |
tree | 2192e1abfb7e85d866a5fd9efffb221bed0344cb /.config/bash/rc.sh | |
parent | 81bdd77380a77945931687b334d47c95b7492a8d (diff) | |
parent | d65775a22e1648eca8e74389a4d9c1c299017cf3 (diff) |
Merge remote-tracking branch 'origin/master' into build64-par
Diffstat (limited to '.config/bash/rc.sh')
-rw-r--r-- | .config/bash/rc.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/.config/bash/rc.sh b/.config/bash/rc.sh index 447796a..2bf60bc 100644 --- a/.config/bash/rc.sh +++ b/.config/bash/rc.sh @@ -13,17 +13,16 @@ shopt -s checkhash ################################################################################ # History settings -export HISTCONTROL=ignoredups -export HISTFILE=${XDG_CACHE_HOME}/bash/history -export HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' -export HISTSIZE=5000 +HISTCONTROL=ignoredups +HISTFILE=${XDG_CACHE_HOME}/bash/history +HISTTIMEFORMAT='[%Y-%m-%d %H:%M] ' +HISTSIZE=5000 shopt -s histappend # append to the history file, don't overwrite it mkdir -p "${HISTFILE%/*}" # General settings shopt -s checkwinsize # update the values of LINES and COLUMNS shopt -s globstar # Let ** recursively scan directories -PROMPT_COMMAND='' ################################################################################ # Overly complicated setting of PS1 # @@ -38,6 +37,7 @@ term-title() { esac printf "$fmt" "$*" } +PROMPT_COMMAND='' make_prompt() { echo "${BOLD}${GREEN}\u@\h${BLUE}:\w${RESET}" @@ -57,7 +57,7 @@ if tput setaf 1 &>/dev/null; then _STATUS+="\$(v=\$?; [[ \$v = 0 ]] && c='${GREEN}' || c='${RED}'; printf %s%03i \$c \$v)" _STATUS+="${RESET}${BOLD}]${RESET}" else - _STATUS='[$?]' + _STATUS='[$(printf "%03i" $?)]' fi PS1="${_STATUS} $(make_prompt)"'\n\$ ' unset RESET BOLD RED GREEN BLUE _STATUS |