aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/zshrc.org
diff options
context:
space:
mode:
authorGravatar Tom Willemse2026-06-19 16:33:45 -0700
committerGravatar Tom Willemse2026-07-02 17:59:21 -0700
commit404393ae35c5cecc2980c9f4e8d3c2b331ef4070 (patch)
tree9552ed0b868eca62c955b4048e78068079a36a0f /zsh/zshrc.org
parent643b40db52fa02905e741548eab0c9d187d25df0 (diff)
downloadnew-dotfiles-404393ae35c5cecc2980c9f4e8d3c2b331ef4070.tar.gz
new-dotfiles-404393ae35c5cecc2980c9f4e8d3c2b331ef4070.zip
zsh: Mark the prompt, input, and output with OSC codes
Diffstat (limited to 'zsh/zshrc.org')
-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.