2015-12-15 00:12:17 -05:00
|
|
|
#
|
|
|
|
# generic options and environment settings
|
|
|
|
#
|
|
|
|
|
|
|
|
# use smart URL pasting and escaping
|
2015-12-27 03:56:18 -05:00
|
|
|
autoload -Uz is-at-least
|
|
|
|
if [[ ${ZSH_VERSION} != 5.1.1 ]]; then
|
2016-06-15 21:46:54 -04:00
|
|
|
if is-at-least 5.2; then
|
|
|
|
autoload -Uz bracketed-paste-url-magic
|
2016-06-22 19:07:26 -04:00
|
|
|
zle -N bracketed-paste bracketed-paste-url-magic
|
2016-06-15 21:46:54 -04:00
|
|
|
else
|
|
|
|
if is-at-least 5.1; then
|
|
|
|
autoload -Uz bracketed-paste-magic
|
|
|
|
zle -N bracketed-paste bracketed-paste-magic
|
|
|
|
fi
|
|
|
|
autoload -Uz url-quote-magic
|
|
|
|
zle -N self-insert url-quote-magic
|
2015-12-27 03:56:18 -05:00
|
|
|
fi
|
2015-12-26 00:32:25 -05:00
|
|
|
fi
|
2015-12-15 00:12:17 -05:00
|
|
|
|
|
|
|
# Treat single word simple commands without redirection as candidates for resumption of an existing job.
|
|
|
|
setopt AUTO_RESUME
|
|
|
|
|
2016-10-28 17:19:03 -04:00
|
|
|
# List jobs in the long format by default.
|
2015-12-15 00:12:17 -05:00
|
|
|
setopt LONG_LIST_JOBS
|
|
|
|
|
|
|
|
# Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
|
|
|
|
setopt NOTIFY
|
|
|
|
|
|
|
|
# Run all background jobs at a lower priority. This option is set by default.
|
|
|
|
unsetopt BG_NICE
|
|
|
|
|
2015-12-15 02:16:11 -05:00
|
|
|
# Send the HUP signal to running jobs when the shell exits.
|
2015-12-15 00:12:17 -05:00
|
|
|
unsetopt HUP
|
|
|
|
|
2016-10-28 17:19:03 -04:00
|
|
|
# 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.
|
2015-12-15 00:12:17 -05:00
|
|
|
unsetopt CHECK_JOBS
|
2016-10-28 17:19:03 -04:00
|
|
|
|
|
|
|
# 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
|
2017-01-21 11:54:32 -05:00
|
|
|
|
|
|
|
# sets the window title and updates upon directory change
|
|
|
|
# more work probably needs to be done here to support multiplexers
|
|
|
|
if (($+ztermtitle)); then
|
|
|
|
case ${TERM} in
|
|
|
|
xterm*)
|
|
|
|
precmd() { print -Pn "\e]0;${ztermtitle}\a" }
|
|
|
|
precmd # we execute it once to initialize the window title
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|