Also made the batcat alias conditional to solve headaches I've been having for 5 years

This commit is contained in:
Brad Ganley 2024-02-24 00:51:34 +00:00
parent ecece1433f
commit bbe0b30222

View File

@ -4,8 +4,13 @@
alias sudo='sudo ' alias sudo='sudo '
#what cd should do by default #what cd should do by default
alias cd='cd_func' if command -v batcat &> /dev/null
alias bat='batcat ' then
alias cd='cd_func'
alias bat='batcat '
fi
cd_func () cd_func ()
{ {
builtin cd "$@" && ls --color=auto --group-directories-first --format=single-column builtin cd "$@" && ls --color=auto --group-directories-first --format=single-column