aboutsummaryrefslogtreecommitdiffstats
path: root/zsh
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-06-19 16:33:45 -0700
committerGravatar Tom Willemse2026-08-26 23:04:25 -0700
commit43536d7405bd64760f70a90c1afed7ab92df8b16 (patch)
tree64e869ce01f7308f7a1e55ca38644197d29550f9 /zsh
parent153d533f70bf25e11704d2c06e2ee3d1bebe184c (diff)
downloadnew-dotfiles-43536d7405bd64760f70a90c1afed7ab92df8b16.tar.gz
new-dotfiles-43536d7405bd64760f70a90c1afed7ab92df8b16.zip
zsh: Mark the prompt, input, and output with OSC codes
Diffstat (limited to 'zsh')
-rw-r--r--zsh/zshrc.org15
1 files changed, 14 insertions, 1 deletions
diff --git a/zsh/zshrc.org b/zsh/zshrc.org
index f89ab2d..57d9228 100644
--- a/zsh/zshrc.org
+++ b/zsh/zshrc.org
@@ -208,7 +208,20 @@ Autoload any ZSH function from =$HOME/.zsh/functions=.
#+begin_src sh
PROMPT='%T $(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f '
- RPROMPT='${vcs_info_msg_0_}'
+ PROMPT='%{\e]133;P;k=i\a%}%T $(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f %{\e]133;B\a%}'
+ PROMPT=$'%{\e]133;P;k=i\a%}%T $(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f %{\e]133;B\a%}'
+ RPROMPT=$'%{\e]133;P;k=r\a%}${vcs_info_msg_0_}%{\e]133;B\a%}'
+ #+end_src
+
+ Execute this preexec function to mark the output field.
+
+ #+begin_src sh
+ function mark_output()
+ {
+ printf "\\e]133;C\a"
+ }
+
+ add-zsh-hook preexec mark_output
#+end_src
Set the current tab's title (for wezterm at least), to the current project directory. This is set above with the =%r= specifier.