From 7c024db210200dfd5e6f61df205a285830c8d821 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Tue, 12 Jul 2022 17:31:00 -0700 Subject: [PATCH] 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) --- .config/shell/aliases | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.config/shell/aliases b/.config/shell/aliases index bc75ada..bea97b9 100644 --- a/.config/shell/aliases +++ b/.config/shell/aliases @@ -59,10 +59,12 @@ command -v paru > /dev/null && alias parue="$(which paru) --color=auto --sudoloop --newsonupgrade --pgpfetch --upgrademenu --bottomup --fm nvim" \ paru='parue --skipreview' \ -if command -v lsd > /dev/null; then - ! $IS_TTY && alias ls=lsd +# TODO: make sure IS_TTY is set to a value in the env file, in case the profile is not installed. +if command -v lsd > /dev/null && ! ${IS_TTY:-false}; then + alias ls=lsd alias lsd='lsd --group-dirs=first' fi + # <<< ## Mini short-hand scripts (ex: glone = git clone) >>> # dotfile management