2 emulate -L zsh # also sets localoptions for us
5 printf '\e]7;file://%s%s\e\' $HOST ${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}}
8 function chpwd-osc7-pwd() {
9 (( ZSH_SUBSHELL )) || osc7-pwd
11 add-zsh-hook -Uz chpwd chpwd-osc7-pwd
14 print -Pn "\e]133;A\e\\"
18 if ! builtin zle; then
19 print -n "\e]133;D\e\\"
24 print -n "\e]133;C\e\\"