zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: linuxtechguy@gmail.com
Cc: zsh <zsh-users@zsh.org>
Subject: Re: I can't explain the following
Date: Tue, 26 Apr 2022 18:22:40 -0700	[thread overview]
Message-ID: <CAH+w=7Y3ts6igm5M9AjE_Nv-_X=Bi4S0=fKWA-xXHixJorJoBA@mail.gmail.com> (raw)
In-Reply-To: <CA+rB6GK-z6DD-nNwLtUZqwUfo+T=oV3+iQDPEpnVCzsVtT1K2A@mail.gmail.com>

On Tue, Apr 26, 2022 at 8:51 AM Jim <linux.tech.guy@gmail.com> 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.


  reply	other threads:[~2022-04-27  1:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-26 15:49 Jim
2022-04-27  1:22 ` Bart Schaefer [this message]
2022-04-27 15:20   ` Jim
2022-04-27 15:59     ` Bart Schaefer
2022-04-27 17:47       ` Jim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Y3ts6igm5M9AjE_Nv-_X=Bi4S0=fKWA-xXHixJorJoBA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=linuxtechguy@gmail.com \
    --cc=zsh-users@zsh.org \
    --subject='Re: I can'\''t explain the following' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).