aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <[email protected]>2026-04-17 10:53:55 +0100
committerLibravatar sommerfeld <[email protected]>2026-04-17 10:53:55 +0100
commit0fb3b19e003b734529a33e26911e0ebff0b7bc5d (patch)
treeea61d1c5fe4808f7ccbf0bf506021427678bd1f9
parenta418762e4211673a3dd3969afbfc09843acab6a5 (diff)
downloaddotfiles-0fb3b19e003b734529a33e26911e0ebff0b7bc5d.tar.gz
dotfiles-0fb3b19e003b734529a33e26911e0ebff0b7bc5d.tar.bz2
dotfiles-0fb3b19e003b734529a33e26911e0ebff0b7bc5d.zip
feat: emit OSC 7 CWD for zellij pane/tab inheritance
-rw-r--r--home/.config/zsh/.zshrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/home/.config/zsh/.zshrc b/home/.config/zsh/.zshrc
index 22f70d6..9f1e09a 100644
--- a/home/.config/zsh/.zshrc
+++ b/home/.config/zsh/.zshrc
@@ -160,6 +160,13 @@ add-zsh-hook chpwd chpwd_recent_dirs
zstyle ':chpwd:*' recent-dirs-file "$XDG_STATE_HOME/zsh/chpwd-recent-dirs"
zstyle ':completion:*:*:cdr:*:*' menu selection
+# ── OSC 7 — report CWD to terminal (zellij uses this for new pane/tab CWD) ──
+_osc7_chpwd() {
+ printf '\e]7;file://%s%s\e\\' "${HOST}" "${PWD}"
+}
+add-zsh-hook chpwd _osc7_chpwd
+_osc7_chpwd
+
# ── Help system ───────────────────────────────────────────────────────────────
autoload -Uz run-help run-help-git run-help-ip
(( $+aliases[run-help] )) && unalias run-help