34 lines
729 B
Bash
34 lines
729 B
Bash
#
|
|
# ~/.bashrc
|
|
#
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
shopt -s histappend
|
|
PROMPT_COMMAND="history -a; history -n; $PROMPT_COMMAND"
|
|
|
|
PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m \$ '
|
|
|
|
if [ -e /usr/share/git/git-prompt.sh ]; then
|
|
source /usr/share/git/git-prompt.sh
|
|
GIT_PS1_SHOWDIRTYSTATE=1
|
|
PS1='\e[34m\u@\h\e[0m \e[32m\W\e[0m$(__git_ps1) \$ '
|
|
fi
|
|
|
|
HISTTIMEFORMAT='%F %R '
|
|
|
|
function before_command() { echo -ne '\e[2 q'; }
|
|
trap before_command DEBUG
|
|
|
|
# Aliases.
|
|
for f in ~/.config/shellconfig/*.sh; do source "$f"; done
|
|
|
|
if [[ "$TERM" = st-256color ]]; then
|
|
tput smkx
|
|
fi
|
|
|
|
if [[ -f /usr/share/bash-completion/bash_completion ]]; then
|
|
. /usr/share/bash-completion/bash_completion
|
|
fi
|