Escape user input in zsh integration's _ksi_preexec

Also fix a bug in one of the test assertions to make the test work.
This commit is contained in:
Jacob Komissar
2025-06-23 18:16:54 -04:00
parent 909671f508
commit 9549618bc9
2 changed files with 5 additions and 2 deletions

View File

@@ -222,7 +222,7 @@ _ksi_deferred_init() {
# its preexec hook before us, we'll incorrectly mark its output as
# belonging to the command (as if the user typed it into zle) rather
# than command output.
builtin print -nu "$_ksi_fd" -f '\e]133;C;cmdline=%q\a' "$1"
builtin print -nu "$_ksi_fd" -f '\e]133;C;cmdline=%q\a' -- "$1"
(( _ksi_state = 1 ))
}