###################### # Configure PATH ENV # ###################### # prepend additional user directories export PATH="$PATH:/usr/local/scripts:$HOME/bin:$HOME/.local/bin:$HOME/scripts" ########################## # Configure shell prompt # ########################## # Colors # 0 - Black # 1 - Red # 2 - Green # 3 - Yellow # 4 - Blue # 5 - Magenta # 6 - Cyan # 7 - White # you can make it lighter with BOLD attribute # CNORM="\[$(tput sgr0)\]" CLIGHTGREEN="\[$(tput bold)$(tput setaf 2)\]" CGREEN="$CNORM\[$(tput setaf 2)\]" CLIGHTCYAN="\[$(tput bold)$(tput setaf 6)\]" CCYAN="$CNORM\[$(tput setaf 6)\]" CGRAY="$CNORM\[$(tput setaf 7)\]" CWHITE="\[$(tput bold)$(tput setaf 7)\]" CLIGHTRED="\[$(tput bold)$(tput setaf 1)\]" # assign colors to data DAYC=$CLIGHTGREEN DATEC=$CGREEN PATHC=$CLIGHTGREEN HOSTC=$CLIGHTCYAN EVENTC=$CCYAN TIMEC=$CGREEN GTC=$CWHITE LASTEXITC=$CLIGHTGREEN SUCOLOR=$CLIGHTRED # Prepare prompt PRUSER="-" if [ "$EUID" = "0" ]; then PRUSER="${SUCOLOR}#${CNORM}" fi PS1="$DAYC\D{%a}$DATEC/\D{%b,%d}:pts/\l:$PATHC\w\n\ ${HOSTC}\h$CNORM:$PRUSER$EVENTC\!$TIMEC/\A$CNORM|$LASTEXITC\$?$GTC>$CNORM" export PS1 # PS2 – Continuation interactive prompt export PS2="continue-> " # The PS4 shell variable defines the prompt that gets displayed, when you execute a shell script in debug mode export PS4='$0.$LINENO+ ' ################ # Autocomplete # ################ # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if ! shopt -oq posix; then if [ -f /usr/share/bash-completion/bash_completion ]; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ]; then . /etc/bash_completion fi fi [ -f "$HOME/.local/bin/aws_completer" ] && complete -C "$HOME/.local/bin/aws_completer" aws ######## # MISC # ######## export HISTSIZE=1000 export HISTTIMEFORMAT="%t%d.%m.%y %H:%M:%S%t" export EDITOR=/usr/bin/vim.nox export LESS="-e -X" export SSH_ASKPASS='/usr/bin/ksshaskpass' export XDG_CONFIG_HOME=$HOME/.config export XDG_CACHE_HOME=$HOME/.cache export XDG_DATA_HOME=$HOME/.local/share [ -f "$HOME/.bash_aliases" ] && source "$HOME/.bash_aliases"