summaryrefslogtreecommitdiff
path: root/.config/bash/bashrc
blob: 0d8e415b9e172876efe5092b19be55ec3caa231d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if [[ ! $- == *i* ]]; then
        . /etc/profile
        . ~/.profile
fi

[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/bash/local.bashrc" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/bash/local.bashrc"
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/bash/complete_alias" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/bash/complete_alias"

export PS1='\[\e]0;\w $(test "$IN_KAKOUNE_CONNECT" && printf '%s' "- $KAKOUNE_CLIENT@[$KAKOUNE_SESSION]")$(test "$TERM" && printf '%s' "- $TERM")\a\]\n\[\e[32m\]\u@\h \e[34m$(test "$IN_KAKOUNE_CONNECT" && printf '%s' "¶$KAKOUNE_SESSION") \[\e[33m\]\w\[\e[0m\] $(w="$(terraform workspace show; ls *.tf >/dev/null 2>&1)" && test "$w" && printf '%s' "🥡 $w") \[\e[1;91m\]$(branch="$(git branch --show-current 2>/dev/null)" && test "$branch" && printf '%s' " $branch")\[\e[0m\]\n\[\e[1;36;1m\]λ\[\e[0m\] '
export PROMPT_DIRTRIM=3
export PROMPT_COMMAND='history -a'
export HISTSIZE=100000
export HISTCONTROL=ignorespace:erasedups

complete -F _complete_alias $(alias | cut -d= -f1 | cut -d' ' -f2)