mirror of https://github.com/artizirk/dotfiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
322 B
13 lines
322 B
1 year ago
|
function osc7-pwd() {
|
||
|
emulate -L zsh # also sets localoptions for us
|
||
|
setopt extendedglob
|
||
|
local LC_ALL=C
|
||
|
printf '\e]7;file://%s%s\e\' $HOST ${PWD//(#m)([^@-Za-z&-;_~])/%${(l:2::0:)$(([##16]#MATCH))}}
|
||
|
}
|
||
|
|
||
|
function chpwd-osc7-pwd() {
|
||
|
(( ZSH_SUBSHELL )) || osc7-pwd
|
||
|
}
|
||
|
add-zsh-hook -Uz chpwd chpwd-osc7-pwd
|
||
|
|