[environment] Add less or more as default PAGER
Set `less` (if available) or `more` as `PAGER`, if `PAGER` is not set.
This commit is contained in:
parent
749b712f1c
commit
e41618767d
1 changed files with 13 additions and 4 deletions
|
@ -21,7 +21,7 @@ fi
|
|||
# Treat single word simple commands without redirection as candidates for resumption of an existing job.
|
||||
setopt AUTO_RESUME
|
||||
|
||||
# List jobs in the long format by default.
|
||||
# List jobs in the long format by default.
|
||||
setopt LONG_LIST_JOBS
|
||||
|
||||
# Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
|
||||
|
@ -33,7 +33,16 @@ unsetopt BG_NICE
|
|||
# Send the HUP signal to running jobs when the shell exits.
|
||||
unsetopt HUP
|
||||
|
||||
# Report the status of background and suspended jobs before exiting a shell with job control;
|
||||
# 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
|
||||
# Report the status of background and suspended jobs before exiting a shell with job control;
|
||||
# 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.
|
||||
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