diff options
-rw-r--r-- | .config/zsh/utils.zsh | 14 | ||||
-rw-r--r-- | .config/zsh/zshenv | 6 |
2 files changed, 12 insertions, 8 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' diff --git a/.config/zsh/zshenv b/.config/zsh/zshenv index 80ac555..29e10b8 100644 --- a/.config/zsh/zshenv +++ b/.config/zsh/zshenv @@ -1,7 +1,6 @@ export EDITOR='vim' export PAGER='less' export LESS='--RAW-CONTROL-CHARS' -export GPG_TTY=$TTY export PATH=$HOME/.local/bin:$PATH @@ -21,8 +20,3 @@ fi if command -v npm &> /dev/null; then export npm_config_prefix="$HOME/.local" fi - -if command -v bat &> /dev/null; then - export MANPAGER="sh -c 'col -bx | bat --plain --language man'" - export MANROFFOPT="-c" -fi |