OSC133 outputs shouldn't be printed in non-interactive mode

Daniel Colascione <[email protected]> Sun, 12 Jul 2026 15:56:36 -0400
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
In current master, a non-interactive shell with zsh loaded and a ctty
will print OSC133 C/D pairs around every command, which is pointless
because the shell is non-interactive and the output unwanted.

Proposed fix:

diff --git a/Src/Zle/termquery.c b/Src/Zle/termquery.c
index 6b545fe1a..0d30fb327 100644
--- a/Src/Zle/termquery.c
+++ b/Src/Zle/termquery.c
@@ -780,6 +780,8 @@ mark_output(int start)
{
	static const char START[] = "\033]133;C\033\\";
	static const char END[] = "\033]133;D\033\\";
+	if (!isset(INTERACTIVE)) return;
	if (extension_enabled("integration", "output", 11, 1))
        write_loop(SHTTY, start ? START : END,