From 09f6d9bd31a913551fef42c3d10a24cbe3996be7 Mon Sep 17 00:00:00 2001 From: Starfall Date: Mon, 16 Sep 2024 09:04:38 -0500 Subject: zsh: minor cleanup --- .config/zsh/utils.zsh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to '.config/zsh/utils.zsh') diff --git a/.config/zsh/utils.zsh b/.config/zsh/utils.zsh index 486484a..bc986d9 100644 --- a/.config/zsh/utils.zsh +++ b/.config/zsh/utils.zsh @@ -6,9 +6,7 @@ function has () { } # cat -if has bat; then - alias cat='bat --plain --paging=never' -fi +has bat && alias cat='bat --plain --paging=never' # should consider another alias for --show-all (and --number on base cat) but it's not a good default # diff @@ -35,9 +33,7 @@ else fi # tree -if has tree; then - alias tree='tree -C' -fi +has tree && alias tree='tree -C' # mkdir alias mkdir='mkdir -p' @@ -49,9 +45,7 @@ alias dd="dd status=progress oflag=direct,sync" alias df="df -TH --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=squashfs" # gpg -if has gpg2; then - alias gpg='gpg2' -fi +has gpg2 && alias gpg='gpg2' # cygwin-specific if [[ "$OSTYPE" == 'cygwin' ]]; then -- cgit