Check is eza exists before ls alias overwrite

This commit is contained in:
Tim 2023-12-15 18:21:02 +01:00
parent 1df7feaa6a
commit c707c3fbb2

View File

@ -29,11 +29,12 @@ alias python=python3
# eza overide # eza overide
TREE_IGNORE="cache|log|logs|node_modules|vendor" TREE_IGNORE="cache|log|logs|node_modules|vendor"
alias ls=' eza --group-directories-first' if type "$foobar_command_name" > /dev/null; then
alias la=' ls -a' alias ls=' eza --group-directories-first'
alias ll=' ls --git -l' alias la=' ls -a'
alias lt=' ls --tree -D -L 2 -I ${TREE_IGNORE}' alias ll=' ls --git -l'
alias ltt=' ls --tree -D -L 3 -I ${TREE_IGNORE}' alias lt=' ls --tree -D -L 2 -I ${TREE_IGNORE}'
alias lttt=' ls --tree -D -L 4 -I ${TREE_IGNORE}' alias ltt=' ls --tree -D -L 3 -I ${TREE_IGNORE}'
alias ltttt=' ls --tree -D -L 5 -I ${TREE_IGNORE}' alias lttt=' ls --tree -D -L 4 -I ${TREE_IGNORE}'
alias ltttt=' ls --tree -D -L 5 -I ${TREE_IGNORE}'
fi