From 80d75659e9a1dc0768c05e38ae685efb75a85912 Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Sat, 12 Jun 2021 15:42:06 -0400 Subject: [PATCH] ENH only alias exa if it exists --- dot_config/zsh/dot_zshrc.tmpl | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dot_config/zsh/dot_zshrc.tmpl b/dot_config/zsh/dot_zshrc.tmpl index 10f3cbc..a33283a 100644 --- a/dot_config/zsh/dot_zshrc.tmpl +++ b/dot_config/zsh/dot_zshrc.tmpl @@ -197,9 +197,15 @@ alias ls='ls --color' alias grep='grep --color=auto' alias sudo='sudo ' alias diff=colordiff -alias ll='exa -alhg --group-directories-first' -alias llt='exa -T' -alias llg='ll --git' + +if [ -e /bin/exa ]; then + alias ll='exa -alhg --group-directories-first' + alias llt='exa -T' + alias llg='ll --git' +else + alias ll='ls -alh' + [ -e /bin/tree ] && alias llt='tree' +fi setopt autopushd @@ -306,4 +312,4 @@ fi if command -v rbenv 1>/dev/null 2>&1; then eval "$(rbenv init - | sed '/PATH/d' -)" fi -{{- end }} \ No newline at end of file +{{- end }}