Re: OSC133 outputs shouldn't be printed in non-interactive mode
Oliver Kiddle <[email protected]> Tue, 14 Jul 2026 12:37:27 +0200
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
Daniel Colascione wrote: > 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. Thanks for the report. I wouldn't normally expect a non-interactive shell to load zle at all so my initial worry on reading this was that the changes to add OSC133 outputs were loading zle. The code explicitly guards against that and it doesn't seem to be case in testing but it'd be helpful to know more exactly how you're invoking zsh where you encountered this. Perhaps you have zle commands like bindkey in .zshenv instead of .zshrc. > Proposed fix: Thanks. I'd be inclined to add the isset(INTERACTIVE) condition earlier in the call stack such as around the zleentry() calls in init.c for ZLE_CMD_PREEXEC and ZLE_CMD_POSTEXEC instead. Anyone have an opinion on that? Oliver