2019-05-28 17:44:30 +02:00
|
|
|
# Define where cd looks for targets
|
2020-03-23 12:23:14 +01:00
|
|
|
[ -d ~/Documents/Code ] && CDPATH='.:~/Documents/Code'
|
2019-05-28 17:44:30 +02:00
|
|
|
|
2019-06-19 20:43:45 +02:00
|
|
|
# Set the primary prompt string
|
|
|
|
# shellcheck disable=SC2154
|
2020-10-12 15:22:20 +02:00
|
|
|
PS1='┌──[\[\e[m\]\[\033[38;5;12m\]\t\[\e[m\]\[\e[m\]]──$(test 0 -eq $? || printf "[\033[m\033[38;5;196m$_\033[0m]──")[\[\e[m\]\[\033[38;5;166m\]\u\[\e[m\]\[\e[m\]:\[\e[m\]\[\033[38;5;168m\]\w\[\e[m\]\[\e[m\]\[\033[38;5;150m\]$(b=$(git branch --show-current 2>/dev/null) && (git diff-index --quiet --ignore-submodules HEAD 2>/dev/null && printf " ($b)" || printf " {$b}"))\[\e[m\]]\n└─${DISPLAY+➤} \$ \[\e[m\]'
|
2019-05-28 17:44:30 +02:00
|
|
|
|
|
|
|
# Don't record some commands
|
2020-01-20 08:03:32 +01:00
|
|
|
HISTIGNORE='&:[ ]*:cd *:ls:ll:exit:logout:history:clear:bg:fg'
|
2019-05-28 17:44:30 +02:00
|
|
|
|
|
|
|
# Remove old duplicate commands
|
|
|
|
HISTCONTROL='erasedups'
|
|
|
|
|
2019-06-19 20:43:45 +02:00
|
|
|
# Move the history file away from $HOME
|
2019-09-25 20:07:56 +02:00
|
|
|
HISTFILE="$XDG_CACHE_HOME/.bash_history"
|
2019-05-28 17:44:30 +02:00
|
|
|
|
|
|
|
# Print time of command in history
|
|
|
|
HISTTIMEFORMAT='{%Y-%m-%d %T} '
|
|
|
|
|
|
|
|
# Automatically trim long paths in the prompt
|
2019-06-19 20:43:45 +02:00
|
|
|
PROMPT_DIRTRIM=2
|
2019-05-28 17:44:30 +02:00
|
|
|
|
|
|
|
# Don't complete files with the following extensions
|
|
|
|
FIGNORE='~:.o:.swp:.pyc'
|
|
|
|
|
2019-11-11 18:44:44 +01:00
|
|
|
# Show hints in ./configure --option=
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
COMP_CONFIGURE_HINTS=1
|
|
|
|
|
2019-05-28 17:44:30 +02:00
|
|
|
: # ensure 0 exit code
|
|
|
|
|
2019-11-24 15:50:07 +01:00
|
|
|
# vim:wrap:lbr:bri:briopt=shift\:4:
|