zsh/env/15_basic.zsh
crater2150 c87430681f env
2023-03-20 12:54:18 +01:00

14 lines
237 B
Bash

local function first-command() {
while [[ -n $1 ]]; do
if command -v $1 > /dev/null; then
echo $1
return 0
fi
shift
done
return 1
}
export PAGER=${PAGER:-$(first-command nvimpager vimpager less)}
export MANPAGER=${PAGER}