2022-06-01 08:00:25 +00:00
|
|
|
# shellcheck shell=bash
|
|
|
|
|
2019-05-28 15:44:30 +00:00
|
|
|
# Define where cd looks for targets
|
2023-01-27 11:33:26 +00:00
|
|
|
[[ -d "$HOME/Documents/Code" ]] && CDPATH='.:/mnt/ext/Code'
|
2019-05-28 15:44:30 +00:00
|
|
|
|
2019-06-19 18:43:45 +00:00
|
|
|
# Set the primary prompt string
|
|
|
|
# shellcheck disable=SC2154
|
2020-10-12 13:22:20 +00: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 15:44:30 +00:00
|
|
|
|
|
|
|
# Don't record some commands
|
2022-03-16 08:52:53 +00:00
|
|
|
HISTIGNORE='[ ]*:ls:ll:exit:logout:history:clear:bg:fg'
|
2019-05-28 15:44:30 +00:00
|
|
|
|
|
|
|
# Remove old duplicate commands
|
|
|
|
HISTCONTROL='erasedups'
|
|
|
|
|
2019-06-19 18:43:45 +00:00
|
|
|
# Move the history file away from $HOME
|
2022-09-05 07:53:48 +00:00
|
|
|
HISTFILE="$XDG_STATE_HOME/bash/history"
|
2019-05-28 15:44:30 +00:00
|
|
|
|
|
|
|
# Print time of command in history
|
|
|
|
HISTTIMEFORMAT='{%Y-%m-%d %T} '
|
|
|
|
|
|
|
|
# Automatically trim long paths in the prompt
|
2019-06-19 18:43:45 +00:00
|
|
|
PROMPT_DIRTRIM=2
|
2019-05-28 15:44:30 +00:00
|
|
|
|
|
|
|
# Don't complete files with the following extensions
|
|
|
|
FIGNORE='~:.o:.swp:.pyc'
|
|
|
|
|
2019-11-11 17:44:44 +00:00
|
|
|
# Show hints in ./configure --option=
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
COMP_CONFIGURE_HINTS=1
|
|
|
|
|
2019-05-28 15:44:30 +00:00
|
|
|
: # ensure 0 exit code
|
|
|
|
|
2019-11-24 14:50:07 +00:00
|
|
|
# vim:wrap:lbr:bri:briopt=shift\:4:
|