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
TREE_IGNORE="cache|log|logs|node_modules|vendor"
alias ls=' eza --group-directories-first'
alias la=' ls -a'
alias ll=' ls --git -l'
alias lt=' ls --tree -D -L 2 -I ${TREE_IGNORE}'
alias ltt=' ls --tree -D -L 3 -I ${TREE_IGNORE}'
alias lttt=' ls --tree -D -L 4 -I ${TREE_IGNORE}'
alias ltttt=' ls --tree -D -L 5 -I ${TREE_IGNORE}'
if type "$foobar_command_name" > /dev/null; then
alias ls=' eza --group-directories-first'
alias la=' ls -a'
alias ll=' ls --git -l'
alias lt=' ls --tree -D -L 2 -I ${TREE_IGNORE}'
alias ltt=' ls --tree -D -L 3 -I ${TREE_IGNORE}'
alias lttt=' ls --tree -D -L 4 -I ${TREE_IGNORE}'
alias ltttt=' ls --tree -D -L 5 -I ${TREE_IGNORE}'
fi