about summary refs log tree commit diff
path: root/.config/zsh/utils.zsh
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2024-09-16 09:04:38 -0500
committerStarfall <us@starfall.systems>2024-09-16 09:12:59 -0500
commit09f6d9bd31a913551fef42c3d10a24cbe3996be7 (patch)
tree953aa8ca380644a93ef0e71e7aecd33bc960b3d3 /.config/zsh/utils.zsh
parent7f399506b81327198e49d2b873cc0a45e88a27d8 (diff)
zsh: minor cleanup
Diffstat (limited to '.config/zsh/utils.zsh')
-rw-r--r--.config/zsh/utils.zsh12
1 files changed, 3 insertions, 9 deletions
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