From db4ad8a7f8f13f698f763e82e74843f2a35b96e4 Mon Sep 17 00:00:00 2001 From: Heavy Date: Sat, 22 Jan 2022 23:06:30 +0100 Subject: [PATCH] Added exa alias, if available. --- dot_bashrc.d/executable_08.alias.tmpl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/dot_bashrc.d/executable_08.alias.tmpl b/dot_bashrc.d/executable_08.alias.tmpl index cdf88ac..965dd9e 100644 --- a/dot_bashrc.d/executable_08.alias.tmpl +++ b/dot_bashrc.d/executable_08.alias.tmpl @@ -6,8 +6,16 @@ alias ...='cd ../..' alias ....='cd ../../..' # ls aliases -alias ll='ls -l --group-directories-first' -alias ls='ls -hF --color' # add colors for filetype recognition +# Use exa, if installed +if type exa > /dev/null 2>&1; then + export EXA_ICON_SPACING=2 + export TIME_STYLE=long-iso + alias ll='exa -l --git --icons' + alias ls='exa --icons' +else + alias ll='ls -l --group-directories-first' + alias ls='ls -hF --color' # add colors for filetype recognition +fi alias lo='ls -o' # without group information alias lr='ls -lrt' alias la='ls -Al' # show hidden files @@ -65,3 +73,8 @@ fi {{ if eq .bash.prompt.category "Uberspace" -}} alias quota='quota -gls' {{ end -}} + +# Depending on availability +if [ -x /usr/bin/batcat ]; then + alias cat='batcat' +fi