about summary refs log tree commit diff
path: root/.config/zsh/utils.zsh
diff options
context:
space:
mode:
Diffstat (limited to '.config/zsh/utils.zsh')
-rw-r--r--.config/zsh/utils.zsh14
1 files changed, 12 insertions, 2 deletions
diff --git a/.config/zsh/utils.zsh b/.config/zsh/utils.zsh
index cfd9094..abb9e06 100644
--- a/.config/zsh/utils.zsh
+++ b/.config/zsh/utils.zsh
@@ -23,11 +23,21 @@ elif [[ $OSTYPE == 'cygwin' ]]; then
 	alias sudo='cygstart --action=runas'
 fi
 
+if has bat; then
+	alias cat='bat --plain --paging=never'
+	# another with --show-all?
+	export MANPAGER="sh -c 'col -bx | bat --plain --language man'"
+	export MANROFFROPT='-c'
+fi
+
 if has eza; then
 	alias ls='eza'
 	alias ll='eza --long --header --all'
 fi
 
-has bat && alias cat='bat --plain --paging=never' # another for --show-all (and --number on base cat)?
-has gpg2 && alias gpg='gpg2'
+if has gpg2; then
+	alias gpg='gpg2'
+	export GPG_TTY=$TTY
+fi
+
 has tree && alias tree='tree -C'