1
0
Fork 0
mirror of synced 2024-11-16 04:55:35 -05:00
This commit is contained in:
Colin Jamison 2017-01-21 18:18:14 +01:00
commit 501d7f799f
3 changed files with 24 additions and 0 deletions

View file

@ -5,6 +5,8 @@ Sets generic Zsh built-in environment options.
Also enables smart URL-pasting. This prevents the user from having to manually escape URLs.
Uses `.zimrc` defined `${ztermtitle}` variable to set the terminal title, if defined.
ZSH Options
-----------

View file

@ -46,3 +46,14 @@ if [[ -z ${PAGER} ]]; then
export PAGER=more
fi
fi
# 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

View file

@ -42,6 +42,17 @@ zprompt_theme='steeef'
# See: http://zsh.sourceforge.net/Doc/Release/Options.html#Input_002fOutput
#setopt CORRECT
#
# Environment
#
# Set the string below to the desired terminal title format string.
# The terminal title is redrawn upon directory change, however, variables like
# ${PWD} are only evaluated once. Use prompt expansion strings for dynamic data:
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Simple-Prompt-Escapes
# The example below uses the following format: 'username@host:/current/directory'
ztermtitle='%n@%m:%~'
#
# Input
#