1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

zsh: move less/man interactive config to zshrc

This commit is contained in:
Joe Groocock 2020-03-21 12:49:59 +00:00
parent f695136338
commit ed0e66dede
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86
2 changed files with 23 additions and 23 deletions

View File

@ -18,6 +18,29 @@ if exists tty && tty -s 1>/dev/null 2>/dev/null; then
export GPG_TTY="$(tty)"
fi
# Configure less and add colours
export LESS="-RI"
export PAGER="less"
export MANPAGER="less -+N"
# Disable histfile
export LESSHISTFILE=-
if exists tput; then
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput bold; tput setaf 4) # blue
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
export LESS_TERMCAP_mr=$(tput rev)
export LESS_TERMCAP_mh=$(tput dim)
export LESS_TERMCAP_ZN=$(tput ssubm)
export LESS_TERMCAP_ZV=$(tput rsubm)
export LESS_TERMCAP_ZO=$(tput ssupm)
export LESS_TERMCAP_ZW=$(tput rsupm)
fi
# Set some useful ZSH/Bash options
setopt sharehistory histignorealldups histignorespace histreduceblanks
setopt pathdirs autocd autopushd extendedglob nullglob alwaystoend interactivecomments dvorak

View File

@ -43,29 +43,6 @@ export PATH="${PATH}:/sbin:/usr/sbin:$DOTFILES/scripts:$GOPATH/bin"
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
# Configure less and add colours
export LESS="-RI"
export PAGER="less"
export MANPAGER="less -+N"
# Disable histfile
export LESSHISTFILE=-
if exists tput; then
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput bold; tput setaf 4) # blue
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
export LESS_TERMCAP_mr=$(tput rev)
export LESS_TERMCAP_mh=$(tput dim)
export LESS_TERMCAP_ZN=$(tput ssubm)
export LESS_TERMCAP_ZV=$(tput rsubm)
export LESS_TERMCAP_ZO=$(tput ssupm)
export LESS_TERMCAP_ZW=$(tput rsupm)
fi
# Source secret keys and values into environment
if [ -f "$XDG_CONFIG_HOME/secrets" ]; then
set -o allexport