aliases: only set alias ls to lsd if lsd is a command and if not in a tty (defaults to not being in a tty)

This commit is contained in:
PowerUser64 2022-07-12 17:31:00 -07:00
parent a9d96ff18f
commit 7c024db210

View file

@ -59,10 +59,12 @@ command -v paru > /dev/null && alias
parue="$(which paru) --color=auto --sudoloop --newsonupgrade --pgpfetch --upgrademenu --bottomup --fm nvim" \ parue="$(which paru) --color=auto --sudoloop --newsonupgrade --pgpfetch --upgrademenu --bottomup --fm nvim" \
paru='parue --skipreview' \ paru='parue --skipreview' \
if command -v lsd > /dev/null; then # TODO: make sure IS_TTY is set to a value in the env file, in case the profile is not installed.
! $IS_TTY && alias ls=lsd if command -v lsd > /dev/null && ! ${IS_TTY:-false}; then
alias ls=lsd
alias lsd='lsd --group-dirs=first' alias lsd='lsd --group-dirs=first'
fi fi
# <<< # <<<
## Mini short-hand scripts (ex: glone = git clone) >>> ## Mini short-hand scripts (ex: glone = git clone) >>>
# dotfile management # dotfile management