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

Re: I can't explain the following



On Tue, Apr 26, 2022 at 8:51 AM Jim <linux.tech.guy@xxxxxxxxx> wrote:
>
> What I can't figure out is why zsh/"less" does what it does. Could someone enlighten me?

It's this:

> LESSOPEN='|lesspipe %s'

> Is there a way of "tracing" what is happening?

strace -ff -o tracefile less ...

... and then look through the set of files that are produced.  To save
you the trouble:

execve("/bin/sh", ["sh", "-c", "/bin/zsh -c lesspipe\\ C.gz"],
0x7ffc15c0b800 /* 56 vars */) = 0

Now, why it's running lesspipe with "/bin/zsh -c" instead of with
/bin/sh or at least "/bin/zsh -fc" I don't know.  The doc for "less"
doesn't mention using $SHELL for this case.




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