2015-12-15 06:12:17 +01:00
|
|
|
#
|
|
|
|
# generic options and environment settings
|
|
|
|
#
|
|
|
|
|
|
|
|
# use smart URL pasting and escaping
|
2017-07-31 01:24:58 +02:00
|
|
|
autoload -Uz bracketed-paste-url-magic
|
|
|
|
zle -N bracketed-paste bracketed-paste-url-magic
|
|
|
|
autoload -Uz url-quote-magic
|
|
|
|
zle -N self-insert url-quote-magic
|
2015-12-15 06:12:17 +01:00
|
|
|
|
|
|
|
# Treat single word simple commands without redirection as candidates for resumption of an existing job.
|
|
|
|
setopt AUTO_RESUME
|
|
|
|
|
2016-10-28 23:19:03 +02:00
|
|
|
# List jobs in the long format by default.
|
2015-12-15 06:12:17 +01:00
|
|
|
setopt LONG_LIST_JOBS
|
|
|
|
|
|
|
|
# Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
|
|
|
|
setopt NOTIFY
|
|
|
|
|
2017-07-31 00:37:12 +02:00
|
|
|
# Recognize comments starting with `#`.
|
|
|
|
setopt INTERACTIVE_COMMENTS
|
|
|
|
|
2015-12-15 06:12:17 +01:00
|
|
|
# Run all background jobs at a lower priority. This option is set by default.
|
|
|
|
unsetopt BG_NICE
|
|
|
|
|
2015-12-15 08:16:11 +01:00
|
|
|
# Send the HUP signal to running jobs when the shell exits.
|
2015-12-15 06:12:17 +01:00
|
|
|
unsetopt HUP
|
|
|
|
|
2016-10-28 23:19:03 +02: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 06:12:17 +01:00
|
|
|
unsetopt CHECK_JOBS
|
2016-10-28 23:19:03 +02:00
|
|
|
|
2017-09-22 02:23:14 +02:00
|
|
|
# Remove path separtor from WORDCHARS.
|
|
|
|
WORDCHARS=${WORDCHARS//[\/]}
|
|
|
|
|
2016-10-28 23:19:03 +02:00
|
|
|
# Set less or more as the default pager.
|
2017-05-10 21:30:47 +02:00
|
|
|
if (( ! ${+PAGER} )); then
|
2016-10-28 23:19:03 +02:00
|
|
|
if (( ${+commands[less]} )); then
|
|
|
|
export PAGER=less
|
|
|
|
else
|
|
|
|
export PAGER=more
|
|
|
|
fi
|
|
|
|
fi
|
2017-01-21 17:54:32 +01: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
|
2017-03-15 14:48:54 +01:00
|
|
|
xterm*|*rxvt)
|
2017-01-21 17:54:32 +01:00
|
|
|
precmd() { print -Pn "\e]0;${ztermtitle}\a" }
|
|
|
|
precmd # we execute it once to initialize the window title
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
fi
|