Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: OSC133 outputs shouldn't be printed in non-interactive mode
- X-seq: zsh-users 30700
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Daniel Colascione <dancol@xxxxxxxxxx>
- Cc: zsh <zsh-users@xxxxxxx>
- Subject: Re: OSC133 outputs shouldn't be printed in non-interactive mode
- Date: Tue, 14 Jul 2026 12:37:27 +0200
- Archived-at: <https://zsh.org/users/30700>
- In-reply-to: <87qzl89e2z.fsf@dancol.org>
- List-id: <zsh-users.zsh.org>
- References: <87qzl89e2z.fsf@dancol.org>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author