if test -e /path/to/file command/alias end if test -e /path/to/file1; or test -e /path/to/file2 command/alias end if test -x /usr/bin/eza -o -x $HOME/.cargo/bin/eza # Define eza-based commands function ls command eza -a --color=always --group-directories-first --icons $argv end function lr command eza -al --color=always --group-directories-first --icons $argv end function ll command eza -l --color=always --group-directories-first --icons $argv end function lt command eza -aT --color=always --group-directories-first --icons $argv end function l. command eza -ald --color=always --group-directories-first --icons .* $argv end function lf command eza -aD --color=always --group-directories-first --icons $argv end else # Define dummy functions that remind user to install eza for cmd in lr ll lt l. lf function $cmd echo "The command 'eza' is not installed. Please install 'eza' to use this: https://github.com/eza-community/eza" end end end