diff --git a/fish/functions/cat.fish b/fish/functions/cat.fish index 936a94b..bb4419e 100644 --- a/fish/functions/cat.fish +++ b/fish/functions/cat.fish @@ -1,4 +1,7 @@ -function cat --wraps='bat -pn' --wraps='bat -pn --pager=never' --description 'alias cat bat -pn --pager=never' - bat -pn --pager=never $argv - +function cat + if test -f /usr/bin/bat + /usr/bin/bat -p --pager=never $argv + else + /bin/cat $argv + end end diff --git a/fish/functions/ll.fish b/fish/functions/ll.fish index a5caf83..09dfb45 100644 --- a/fish/functions/ll.fish +++ b/fish/functions/ll.fish @@ -1,3 +1,7 @@ -function ll --wraps=ls --wraps='eza -l --git' --wraps='eza --icons=always -l --git' --description 'alias ll eza --icons=always -l --git' - eza --icons=always -l --git $argv +function ll + if test -f /usr/bin/eza + /usr/bin/eza --icons=always -l --git $argv + else + /bin/ls -l $argv + end end diff --git a/fish/functions/ls.fish b/fish/functions/ls.fish index cf6cab1..10485ce 100644 --- a/fish/functions/ls.fish +++ b/fish/functions/ls.fish @@ -1,3 +1,7 @@ -function ls --wraps=eza --description 'alias ls eza' - eza $argv +function ls + if test -f /usr/bin/eza + /usr/bin/eza $argv + else + /bin/ls --color=auto $argv + end end diff --git a/fish/functions/tree.fish b/fish/functions/tree.fish index 25434eb..448de35 100644 --- a/fish/functions/tree.fish +++ b/fish/functions/tree.fish @@ -1,3 +1,7 @@ -function tree --wraps='eza -T' --description 'alias tree eza -T' - eza -T $argv +function tree + if test -f /usr/bin/eza + /usr/bin/eza -T $argv + else + /bin/tree $argv + end end