use exa as ls replacement

main
Yax 3 years ago
parent 86afcdafd1
commit bca2545b6c

@ -33,27 +33,25 @@ shopt -s checkwinsize
# EDITOR
# ---------------------------------------------------------------------------
if [ -f "$HOME/.local/bin/nvim" ]; then
export EDITOR=$HOME/.local/bin/nvim
export SVN_EDITOR=$HOME/.local/bin/nvim
export GIT_EDITOR=$HOME/.local/bin/nvim
export VISUAL=$HOME/.local/bin/nvim
alias vi='$HOME/.local/bin/nvim'
elif [ -f "/usr/bin/vim" ]; then
export EDITOR=/usr/bin/vim
export SVN_EDITOR=/usr/bin/vim
export GIT_EDITOR=/usr/bin/vim
export VISUAL=/usr/bin/vim
alias vi='/usr/bin/vim'
if hash nvim 2>/dev/null; then
export EDITOR=nvim
elif hash vim 2>/dev/null; then
export EDITOR=vim
elif hash vi 2>/dev/null; then
export EDITOR=vi
else
export EDITOR=nano
fi
export SVN_EDITOR=$EDITOR
export GIT_EDITOR=$EDITOR
export VISUAL=$EDITOR
alias vi=$EDITOR
# ---------------------------------------------------------------------------
# PROMPT
# ---------------------------------------------------------------------------
if [ -f "/usr/bin/starship" ]; then
eval "$(starship init bash)"
else
# set a minimalist prompt
red='\[\e[0;31m\]' # Red
green='\[\e[0;32m\]' # Green
@ -85,15 +83,18 @@ else
GIT_PROMPT_THEME=Solarized_Yax
source $HOME/.bash-git-prompt/gitprompt.sh
fi
fi
# ---------------------------------------------------------------------------
# ALIASES
# ---------------------------------------------------------------------------
# The ubiquitous 'll': directories first, with alphanumeric sorting
if hash exa 2>/dev/null; then
alias ll="exa --long --group-directories-first --classify --git"
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 mv='mv --interactive --verbose'

Loading…
Cancel
Save