shell: set MANPATH in man() function instead

This commit is contained in:
FollieHiyuki 2021-05-06 18:11:51 +03:00
parent 6049d8aaea
commit 5c69c10d97
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
6 changed files with 9 additions and 4 deletions

View File

@ -365,7 +365,6 @@ fi
# PATH
export PATH=$HOME/.local/bin:$HOME/.local/bin/fzf:$NODENV_ROOT/bin:$PYENV_ROOT/bin:$POETRY_HOME/bin:$CARGO_HOME/bin:$GOPATH/bin:$NPM_CONFIG_PREFIX/bin:$PATH
export MANPATH=$HOME/.local/share/man:$MANPATH
# _________________
# ___ |__ /__(_)_____ ________
@ -416,6 +415,7 @@ alias ....='cd ../../..'
# colorize man pages
man() {
MANPATH=$HOME/.local/share/man:$MANPATH \
LESS_TERMCAP_mb=$'\e[01;31m' \
LESS_TERMCAP_md=$'\e[01;36m' \
LESS_TERMCAP_me=$'\e[0m' \

View File

@ -5,6 +5,7 @@
# /_/ |_/_/ /_/ \__,_/ /____/
#
# remap
abbr x extract
abbr p pulsemixer
alias startx='startx $HOME/.config/X11/xinitrc'
alias fehwpp="feh --no-fehbg --bg-fill --randomize ~/Pictures/Wallpapers/*"

View File

@ -382,4 +382,3 @@ end
# PATH
set -gx fish_user_paths $HOME/.local/bin $HOME/.local/bin/fzf $NODENV_ROOT/bin $PYENV_ROOT/bin $POETRY_HOME/bin $CARGO_HOME/bin $GOPATH/bin $NPM_CONFIG_PREFIX/bin
set -gx MANPATH $HOME/.local/share/man:$MANPATH

View File

@ -1,4 +1,10 @@
function man -d "man with colors"
if test -d $HOME/.local/share/man
set -x MANPATH "$HOME/.local/share/man:$__fish_data_dir/man:$MANPATH"
else
set -x MANPATH "$__fish_data_dir/man:$MANPATH"
end
set -x LESS_TERMCAP_mb (printf "\e[01;31m") # begin blink
set -x LESS_TERMCAP_md (printf "\e[01;36m") # begin bold
set -x LESS_TERMCAP_me (printf "\e[0m") # reset bold/blink

View File

@ -403,5 +403,3 @@ fi
typeset -U PATH path
path=("$HOME/.local/bin" "$HOME/.local/bin/fzf" "$NODENV_ROOT/bin" "$PYENV_ROOT/bin" "$POETRY_HOME/bin" "$CARGO_HOME/bin" "$GOPATH/bin" "$NPM_CONFIG_PREFIX/bin" "$path[@]")
export PATH
export MANPATH="$HOME/.local/share/man:$MANPATH"

View File

@ -41,6 +41,7 @@ alias ....='cd ../../..'
# colorize man pages
man() {
MANPATH=$HOME/.local/share/man:$MANPATH \
LESS_TERMCAP_mb=$'\e[01;31m' \
LESS_TERMCAP_md=$'\e[01;36m' \
LESS_TERMCAP_me=$'\e[0m' \