zsh/env/15_basic.zsh

14 lines
237 B
Bash
Raw Normal View History

2023-03-02 15:23:50 +00:00
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}