From 87c935ffe58c416439007060a636196df1a03c51 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 28 Jan 2023 10:34:30 -0500 Subject: [PATCH] Use only command name in window title to avoid escaping issues Was having issues with `%` characters in commands doing weird things. Could alternatively strip those characters out or escape them, but that seemed harder --- .zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index b6ae526..7b1d16a 100644 --- a/.zshrc +++ b/.zshrc @@ -19,7 +19,7 @@ SPROMPT='zsh: correct %F{red}%R%f to %F{green}%r%f [nyae]? ' WORDCHARS=${WORDCHARS//[\/]} # Set window title format -zstyle ':zim:termtitle' format '%~:${1:-zsh}' +zstyle ':zim:termtitle' format '%~:${${(A)=1:-zsh}[1]}' # Set window title before running a command zstyle ':zim:termtitle' hooks 'precmd' 'preexec'