.zshrc: make man/info page viewing in guix shell' seemless

This commit is contained in:
Collin J. Doering 2022-10-01 22:44:51 -04:00
parent ba63deb961
commit c99860af5c
Signed by: rekahsoft
GPG Key ID: 7B4DEB93212B3022
1 changed files with 17 additions and 0 deletions

View File

@ -124,6 +124,23 @@ export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden --bin
# Check for an interactive session
[ -z "$PS1" ] && return
# Preferably, setup of man/info would be automatically be handled by 'guix shell' itself,
# however this is not the case, as the profile hook for man/info pages will not be triggered
# unless man or info respectively is also explicitly included in the profile.
if [ ! -z "$GUIX_ENVIRONMENT" ]; then
# When using guix shell (formally environment) command, automatically add the temporary
# environments man page directory to MANPATH, if it exists.
if [ -d "$GUIX_ENVIRONMENT/share/man" ]; then
export MANPATH="$GUIX_ENVIRONMENT/share/man:$MANPATH"
fi
# Similarly to man, automatically add the temporary environments info page directory to
# INFOPATH, if it exists.
if [ -d "$GUIX_ENVIRONMENT/share/info" ]; then
export INFOPATH="$GUIX_ENVIRONMENT/share/info:$INFOPATH"
fi
fi
# Alias' to make command output prettier (use color with some commands by default)
alias ls='ls --color=auto'
alias ll='ls -l'