Add less or more as default PAGER
Set `less` (if available) or `more` as `PAGER`, if `PAGER` is not set. Closes #101
This commit is contained in:
parent
7a289c4c0d
commit
76ff1bdb3c
1 changed files with 13 additions and 4 deletions
|
@ -35,5 +35,14 @@ unsetopt HUP
|
||||||
|
|
||||||
# Report the status of background and suspended jobs before exiting a shell with job control;
|
# Report the status of background and suspended jobs before exiting a shell with job control;
|
||||||
# a second attempt to exit the shell will succeed.
|
# a second attempt to exit the shell will succeed.
|
||||||
# NO_CHECK_JOBS is best used only in combination with NO_HUP, else such jobs will be killed automatically
|
# NO_CHECK_JOBS is best used only in combination with NO_HUP, else such jobs will be killed automatically.
|
||||||
unsetopt CHECK_JOBS
|
unsetopt CHECK_JOBS
|
||||||
|
|
||||||
|
# Set less or more as the default pager.
|
||||||
|
if [[ -z ${PAGER} ]]; then
|
||||||
|
if (( ${+commands[less]} )); then
|
||||||
|
export PAGER=less
|
||||||
|
else
|
||||||
|
export PAGER=more
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue