Enable OSC 7 integration between zsh and foot
This commit is contained in:
parent
3cb10ab800
commit
4aed342a4e
1 changed files with 13 additions and 0 deletions
|
|
@ -60,3 +60,16 @@ sri() {
|
||||||
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
eval "$(direnv hook zsh)"
|
eval "$(direnv hook zsh)"
|
||||||
|
|
||||||
|
# Let the terminal know the current directory. OSC 7
|
||||||
|
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
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue