|
|
@ -33,67 +33,68 @@ shopt -s checkwinsize
|
|
|
|
# EDITOR
|
|
|
|
# EDITOR
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
if [ -f "$HOME/.local/bin/nvim" ]; then
|
|
|
|
if hash nvim 2>/dev/null; then
|
|
|
|
export EDITOR=$HOME/.local/bin/nvim
|
|
|
|
export EDITOR=nvim
|
|
|
|
export SVN_EDITOR=$HOME/.local/bin/nvim
|
|
|
|
elif hash vim 2>/dev/null; then
|
|
|
|
export GIT_EDITOR=$HOME/.local/bin/nvim
|
|
|
|
export EDITOR=vim
|
|
|
|
export VISUAL=$HOME/.local/bin/nvim
|
|
|
|
elif hash vi 2>/dev/null; then
|
|
|
|
alias vi='$HOME/.local/bin/nvim'
|
|
|
|
export EDITOR=vi
|
|
|
|
elif [ -f "/usr/bin/vim" ]; then
|
|
|
|
else
|
|
|
|
export EDITOR=/usr/bin/vim
|
|
|
|
export EDITOR=nano
|
|
|
|
export SVN_EDITOR=/usr/bin/vim
|
|
|
|
|
|
|
|
export GIT_EDITOR=/usr/bin/vim
|
|
|
|
|
|
|
|
export VISUAL=/usr/bin/vim
|
|
|
|
|
|
|
|
alias vi='/usr/bin/vim'
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export SVN_EDITOR=$EDITOR
|
|
|
|
|
|
|
|
export GIT_EDITOR=$EDITOR
|
|
|
|
|
|
|
|
export VISUAL=$EDITOR
|
|
|
|
|
|
|
|
alias vi=$EDITOR
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# PROMPT
|
|
|
|
# PROMPT
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
if [ -f "/usr/bin/starship" ]; then
|
|
|
|
# set a minimalist prompt
|
|
|
|
eval "$(starship init bash)"
|
|
|
|
red='\[\e[0;31m\]' # Red
|
|
|
|
else
|
|
|
|
green='\[\e[0;32m\]' # Green
|
|
|
|
# set a minimalist prompt
|
|
|
|
blue='\[\e[0;34m\]' # Bold Blue
|
|
|
|
red='\[\e[0;31m\]' # Red
|
|
|
|
boldred='\[\e[1;31m\]' # Bold Red
|
|
|
|
green='\[\e[0;32m\]' # Green
|
|
|
|
reset='\[\e[0m\]' # Text Reset
|
|
|
|
blue='\[\e[0;34m\]' # Bold Blue
|
|
|
|
|
|
|
|
boldred='\[\e[1;31m\]' # Bold Red
|
|
|
|
if [ "$USER" = "root" ] ; then
|
|
|
|
reset='\[\e[0m\]' # Text Reset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$USER" = "root" ] ; then
|
|
|
|
|
|
|
|
# $bold$red
|
|
|
|
# $bold$red
|
|
|
|
PROMPT_USER_COLOR=$boldred
|
|
|
|
PROMPT_USER_COLOR=$boldred
|
|
|
|
PROMPT_SYMBOL="#"
|
|
|
|
PROMPT_SYMBOL="#"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
PROMPT_USER_COLOR=$green
|
|
|
|
PROMPT_USER_COLOR=$green
|
|
|
|
PROMPT_SYMBOL="$"
|
|
|
|
PROMPT_SYMBOL="$"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -n "$SSH_CLIENT$SSH2_CLIENT$SSH_TTY" ]] ; then
|
|
|
|
if [[ -n "$SSH_CLIENT$SSH2_CLIENT$SSH_TTY" ]] ; then
|
|
|
|
PROMPT_SSH="@\h"
|
|
|
|
PROMPT_SSH="@\h"
|
|
|
|
else
|
|
|
|
else
|
|
|
|
PROMPT_SSH=""
|
|
|
|
PROMPT_SSH=""
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
PS1="$PROMPT_USER_COLOR\u$PROMPT_SSH $blue\w$reset $PROMPT_SYMBOL "
|
|
|
|
PS1="$PROMPT_USER_COLOR\u$PROMPT_SSH $blue\w$reset $PROMPT_SYMBOL "
|
|
|
|
|
|
|
|
|
|
|
|
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
|
|
|
if [ -f "$HOME/.bash-git-prompt/gitprompt.sh" ]; then
|
|
|
|
GIT_PROMPT_ONLY_IN_REPO=1
|
|
|
|
GIT_PROMPT_ONLY_IN_REPO=1
|
|
|
|
GIT_PROMPT_IGNORE_SUBMODULES=1
|
|
|
|
GIT_PROMPT_IGNORE_SUBMODULES=1
|
|
|
|
GIT_PROMPT_WITH_VIRTUAL_ENV=0
|
|
|
|
GIT_PROMPT_WITH_VIRTUAL_ENV=0
|
|
|
|
GIT_PROMPT_THEME=Solarized_Yax
|
|
|
|
GIT_PROMPT_THEME=Solarized_Yax
|
|
|
|
source $HOME/.bash-git-prompt/gitprompt.sh
|
|
|
|
source $HOME/.bash-git-prompt/gitprompt.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ALIASES
|
|
|
|
# ALIASES
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
# ---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
# The ubiquitous 'll': directories first, with alphanumeric sorting
|
|
|
|
if hash exa 2>/dev/null; then
|
|
|
|
alias ll="ls -lv --group-directories-first --ignore=.." # show long listing but no hidden dotfiles except "."
|
|
|
|
alias ll="exa --long --group-directories-first --classify --git"
|
|
|
|
alias la='ls -lav'
|
|
|
|
alias la="ll --all"
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
alias ll="ls -lv --group-directories-first --ignore=.." # show long listing but no hidden dotfiles except "."
|
|
|
|
|
|
|
|
alias la='ls -lav'
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
alias rm='rm --interactive --verbose'
|
|
|
|
alias rm='rm --interactive --verbose'
|
|
|
|
alias mv='mv --interactive --verbose'
|
|
|
|
alias mv='mv --interactive --verbose'
|
|
|
|