Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Reverting the effect of 'setopt nomonitor' executed during shell startup



On Fri, Jan 14, 2022 at 3:08 PM Andreas Hartmann <hartan@xxxxx> wrote:
>
> Here's a minimal working example (if you use zplug it works, can't reproduce it
> without zplug and I don't know why...):
>
>   #!/usr/bin/zsh
>
>   /usr/bin/zsh -i -c "echo foo;"
>   stty icanon
>   echo "bar"

Reproduced like this:

  % >test.zsh <<\END
  zsh -fic "unsetopt monitor"
  stty icanon
  END

  % zsh -f ./test.zsh
  zsh: suspended (tty output)  zsh ./test.zsh

Another way to reproduce this:

  % docker run --rm -it zshusers/zsh:5.8 zsh -fc \
      'zsh -fic "unsetopt monitor"; stty icanon'
  stty: 'standard input': Input/output error

This gives a different error but it looks like the same issue.
Replacing unsetopt with setopt gets rid of the error.

Roman.




Messages sorted by: Reverse Date, Date, Thread, Author