|
|
@ -29,6 +29,11 @@ HISTFILESIZE=2000
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
|
|
shopt -s checkwinsize
|
|
|
|
shopt -s checkwinsize
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# add home bin
|
|
|
|
|
|
|
|
if [ -d "$HOME/.local/bin" ]; then
|
|
|
|
|
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# EDITOR
|
|
|
|
# EDITOR
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
@ -52,36 +57,40 @@ alias vi=$EDITOR
|
|
|
|
# PROMPT
|
|
|
|
# PROMPT
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
# set a minimalist prompt
|
|
|
|
if [ -f "$HOME/.local/bin/starship" ]; then
|
|
|
|
red='\[\e[0;31m\]' # Red
|
|
|
|
eval "$(starship init bash)"
|
|
|
|
green='\[\e[0;32m\]' # Green
|
|
|
|
|
|
|
|
blue='\[\e[0;34m\]' # Bold Blue
|
|
|
|
|
|
|
|
boldred='\[\e[1;31m\]' # Bold Red
|
|
|
|
|
|
|
|
reset='\[\e[0m\]' # Text Reset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$USER" = "root" ] ; then
|
|
|
|
|
|
|
|
# $bold$red
|
|
|
|
|
|
|
|
PROMPT_USER_COLOR=$boldred
|
|
|
|
|
|
|
|
PROMPT_SYMBOL="#"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
PROMPT_USER_COLOR=$green
|
|
|
|
|
|
|
|
PROMPT_SYMBOL="$"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -n "$SSH_CLIENT$SSH2_CLIENT$SSH_TTY" ]] ; then
|
|
|
|
|
|
|
|
PROMPT_SSH="@\h"
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
PROMPT_SSH=""
|
|
|
|
# set a minimalist prompt
|
|
|
|
fi
|
|
|
|
red='\[\e[0;31m\]' # Red
|
|
|
|
|
|
|
|
green='\[\e[0;32m\]' # Green
|
|
|
|
PS1="$PROMPT_USER_COLOR\u$PROMPT_SSH $blue\w$reset $PROMPT_SYMBOL "
|
|
|
|
blue='\[\e[0;34m\]' # Bold Blue
|
|
|
|
|
|
|
|
boldred='\[\e[1;31m\]' # Bold Red
|
|
|
|
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
|
|
|
reset='\[\e[0m\]' # Text Reset
|
|
|
|
GIT_PROMPT_ONLY_IN_REPO=1
|
|
|
|
|
|
|
|
GIT_PROMPT_IGNORE_SUBMODULES=1
|
|
|
|
if [ "$USER" = "root" ] ; then
|
|
|
|
GIT_PROMPT_WITH_VIRTUAL_ENV=0
|
|
|
|
# $bold$red
|
|
|
|
GIT_PROMPT_THEME=Solarized_Yax
|
|
|
|
PROMPT_USER_COLOR=$boldred
|
|
|
|
source $HOME/.bash-git-prompt/gitprompt.sh
|
|
|
|
PROMPT_SYMBOL="#"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
PROMPT_USER_COLOR=$green
|
|
|
|
|
|
|
|
PROMPT_SYMBOL="$"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -n "$SSH_CLIENT$SSH2_CLIENT$SSH_TTY" ]] ; then
|
|
|
|
|
|
|
|
PROMPT_SSH="@\h"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
PROMPT_SSH=""
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PS1="$PROMPT_USER_COLOR\u$PROMPT_SSH $blue\w$reset $PROMPT_SYMBOL "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
|
|
|
|
|
|
|
GIT_PROMPT_ONLY_IN_REPO=1
|
|
|
|
|
|
|
|
GIT_PROMPT_IGNORE_SUBMODULES=1
|
|
|
|
|
|
|
|
GIT_PROMPT_WITH_VIRTUAL_ENV=0
|
|
|
|
|
|
|
|
GIT_PROMPT_THEME=Solarized_Yax
|
|
|
|
|
|
|
|
source $HOME/.bash-git-prompt/gitprompt.sh
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
@ -129,6 +138,3 @@ if [ -d "$HOME/.bashrc.d/" ]; then
|
|
|
|
done
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ -d "$HOME/.local/bin" ]; then
|
|
|
|
|
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|