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

STTY fails to reset ICRNL / INLCR



Hi zsh,

The following appears to be a bug:

  $ zsh --version
  zsh 5.9 (x86_64-pc-linux-gnu)
  $ uname -r
  6.8.7-arch1-1
  
  $ reset
  $ STTY={-icanon,-echo} xxd -ps -l3 # input Ctrl-J, Ctrl-M, Return
  0a0a0a
  $ STTY={-icanon,-echo,icrnl,inlcr} xxd -ps -l3 # input Ctrl-J, Ctrl-M, Return
  0d0a0a
  $ STTY={-icanon,-echo} xxd -ps -l3 # input Ctrl-J, Ctrl-M, Return
  0d0a0a

The STTY parameter description in zshparam(1):

> If this parameter is set in a command's environment, the shell runs the stty
> command with the value of this parameter as arguments in order to set up the
> terminal before executing the command. The modes apply only to the command,
> and are reset when it finishes or is suspended.

But as you can see, INLCR was not reset.

Cheers,

Ronan




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