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

Re: Possible ZSH bug involving piping ls to less (MSYS2 & Cygwin)



I'm pretty sure it's been happening intermittently for quite a while, but I
couldn't say for sure when it started. Sorry.

I found a discussion on GitHub of a similar problem where git was being
piped to tig:

    https://github.com/jonas/tig/issues/951

They seem to think they know exactly when the problem started, but I can't
confirm that.

The workaround of using a subshell seems to help, i.e.

    ls --color | (less -R)


Alex

-----Original Message-----
From: Jun T <takimoto-j@xxxxxxxxxxxxxxxxx> 
Sent: Monday, January 25, 2021 5:50 PM
To: zsh-workers@xxxxxxx
Cc: Alexandros Kozak <agkozak@xxxxxxxxx>
Subject: Re: Possible ZSH bug involving piping ls to less (MSYS2 & Cygwin)


> 2021/01/19 4:08, agkozak@xxxxxxxxx wrote:
> 
> Using zsh v5.8 on both MSYS2 and Cygwin and a plain vanilla shell (no
> dotfiles):
> 
> If I run
> 
>    ls --color | less -R
> 
> frequently I get
> 
>    zsh: done                    ls --color |
>    zsh: suspended (tty output)  less -R
> 
> On rare occasions I can get this to happen with a simple
> 
>    ls | less
> 
> but using the --color option seems to make it happen considerably more 
> often. It happens quite frequently on MSYS2; it is harder to reproduce 
> on Cygwin, but it does happen.

Yes, it happens quite frequently on MSYS2.

Has this been happening for a long time, or started to happen rather
recently?
(my experience on MSYS2 is quite limited)





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