From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19513 invoked from network); 1 Oct 2021 01:33:46 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 1 Oct 2021 01:33:46 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1633052026; b=jJO4fcrmXTwH3B9l9p3CZbLKpy9GtXU4TJeL3G4Z91gWGkC3yU4nNlbjUtTLpBQEy+Pp5OSyI1 OjXTwVwyksZdFe1Nc4D9e0NWLmuk9fMbHYuegPz+8Vnr5F6yBya+a2HtlBXoc0lPFYFZdPdaCo pkR6bO+SJxpPWfVMqcFCBecSOTLI7wZmzA5m+paTykp3Jaa6VHxLzbNZ+b5QBvwyO3R9zPg1dN Dcq75woWGjxVxbk6pbMGMfQkEbOj+ngUnhhzrrKfRyi76ea/Th12kJzVlulprEmbk2+hZ/5qVV gKCGQUFrkJKO6MnT0kQ7AfX+DQqvAQoJJjCwSo+Kft5vEw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-il1-f171.google.com) smtp.remote-ip=209.85.166.171; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1633052026; bh=RvxNV6/rNJVthmPSsYIzLyS1HsPmB3sRsM9S0xoPtzI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=IQlEMemVxr2WHKLBF983GKTfkS0Q8GXeuNzXwXSODa6ARaKxGJwKbssJCh/FvsfGVfBeV1iw0z L2GV632eZ0Ro5vEmti9rHfIHUCye4rW/P/c3XjqMuEowAl5dxz8v43gw2PvUB+M9qPLPydXiXa q8/ydWY9Okorx8kmfKUiEw0kvIyU9GLQIs47G2pdwFrEJR/gk8INHMnw4oLzvXpc2cp6Am8Ori gTiyCGSV4pahvN2bLVyi9xDLruYIuCCotyuGHoHHE9XRJJ0Le4wNfYtKwGGBwZZlE00fv9ZukX XFISc5zQu9SrcMcNng6NP0xXtsQulWHjmLZu4uJBZr1a1w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=BsfDVpZ6aqkz1yojFRUvO8m4555qKHHugFE5bMaScmA=; b=QbV4H5JNtA507LC3Q3oZtHisT2 lVQ+D3jZD20GCbH0wiNG+vyT0k3LXZ0TIhP75nsntRS4TdQ5I1nziiIr5OKS2uF6SaIdMMseSxsse Aw8Nobf0SS1zJTcWcszqnCuUSc84U6+JvlvFjHhQ/BWNlRyMU4F6LPZy4QhV0Miu1JCIOc41exOSD i0EdIymn8k5/2uHC+usnTCyt3ChqG8UpOnfGrjsKPij9LV2R+ijWD1W+WISCDBAQt/yOZ0zlG0jQX KCGxAXKPzPo/zyDbMzaZsFqtIKU6dGDBEi5ZLNgoOiJC659/GRXV63oUj2NvxIIVUuyhGCmGuntf/ yY7ed3Zg==; Received: from authenticated user by zero.zsh.org with local id 1mW7Qo-000FG8-0L; Fri, 01 Oct 2021 01:33:46 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-f171.google.com) smtp.remote-ip=209.85.166.171; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-il1-f171.google.com ([209.85.166.171]:35530) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mW7Pn-000EXX-Dx; Fri, 01 Oct 2021 01:32:44 +0000 Received: by mail-il1-f171.google.com with SMTP id x2so8937241ilm.2 for ; Thu, 30 Sep 2021 18:32:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=BsfDVpZ6aqkz1yojFRUvO8m4555qKHHugFE5bMaScmA=; b=Ycxrn6TsvZwafKcbox3d0KemUttdbhzYRfQvb2J/GDQrhCGvbVWw7Y+vX7e3O0rXEZ bnrwMhL1a2AdrjvHTqxdTPojtAkPu10NRgKawabgRnlGul6CaR+wE5cJmh3bsYTLBQGk inVlTgnsApuPSCCe+P0tnJUOoBrEiFJJOSJvT79YhUx/baANsyFbqpYbSUq8E7Y2GST4 ne4h0D02vHH1U5ccAVY+gksZQ5l+CDyPpvWyM0gDBlgDRyiAx7F2wC+MJFKT2rs8cndB 44OyrFrInmIk+KHXQ6hQxFndCUognoV/6TQ7xmWHA8poc4XWFvUjyLDpWu1o7Ac/RngW C0HA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=BsfDVpZ6aqkz1yojFRUvO8m4555qKHHugFE5bMaScmA=; b=PbFIbq3VxLXwbcBkxAY6W8xzS6mS2QOqs2Ks8aOndmR0SffXvujYYxHDrrtfh+XQ48 N0EF/dsZeoFlG3QAwplQTYHH/RPlhLfhIG+CbHr1INtYg7YGr1ok/N8E/7Dzr1ofYXER pOmXVzH+KyrWyB84Yh5D+BPWU7czTHPdcOK1khAIIg8brGO/MYdgHlooflquEyTMeKTb O/PKaiMHsZ3s1uNj5cG8q/NZNyln/l4voqkRGqTT8yrwWLZfc2t5ya7aj94qbyrU5Ute KxUJj5Lgm18l++b4AByY/LowRFqLDpw/k7NFRUPzLgs2xvPKS9TyRK4ONtzyOp/iGEZe +7hA== X-Gm-Message-State: AOAM532S9h8JsKbAdiaCvWgcV/gIsfnwgfXN0VhUfgD48vVIbZPG58Mv qXzCLGqQDVSaCThNjUNb1RskqNfkl/68ZLM54Khu9dy+ X-Google-Smtp-Source: ABdhPJxM7jD7v+s2/7QjHkHHwqNju6zeaP3paM3H71dUG8Gol9UK7Hm3ul/o/DvRZy7mcNRVW2ZCxeXjHkVgNjpr3Mw= X-Received: by 2002:a92:cdad:: with SMTP id g13mr6307416ild.103.1633051961796; Thu, 30 Sep 2021 18:32:41 -0700 (PDT) MIME-Version: 1.0 References: <20210928185230.GA7495@gmx.de> <20210929130217.GB25513@cventin.lip.ens-lyon.fr> <20210930191706.GA1641202@zira.vinc17.org> <20210930194800.GA15560@gmx.de> <20210930234612.GA21179@gmx.de> <20211001003146.GA24071@gmx.de> In-Reply-To: <20211001003146.GA24071@gmx.de> From: Pier Paolo Grassi Date: Fri, 1 Oct 2021 03:32:30 +0200 Message-ID: Subject: Re: less with subprocess To: Zsh-Users List , dominik.vogt@gmx.de Content-Type: multipart/alternative; boundary="000000000000152c4905cd408ac4" X-Seq: 27197 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --000000000000152c4905cd408ac4 Content-Type: text/plain; charset="UTF-8" I use this on production servers where i don't want to alter anything that is't necessary, so of course i will not create ramdisks just for launching a find command with a pager attached ;) this leaving aside the issues with kill raised by vincent, which i didn't yet looked into Il giorno ven 1 ott 2021 alle 02:36 Dominik Vogt ha scritto: > On Fri, Oct 01, 2021 at 02:04:11AM +0200, Pier Paolo Grassi wrote: > > Hello, thanks for your insights, but I think you are kind of missing the > > point: I am already happy with what > > > > less -f <(find ...) > > > > gives me in terms of ux. Of course the output is generated continuously > and > > it is stored in ram by less, having gigabytes of ram it doesn't really > > matters how much output is produced. > > The only upgrade I was looking for was to be able to do ctrl-c to dispose > > of the command even when find had not yet produced enough output to make > > less satisfied, the infamous one screenfull of text. > > 1) This is not an issue at all if the input comes from a regular > file. > > 2) With "less -f <()" it can be solved by artificially > generating at least a screen of output: > > $ less -f <(repeat $LINES; echo; ) > > > I fail to understand how it would help me to create a tmpfs and make the > > long running process write there instead of to a pipe. > > There was some issue about the generating command being killed by > ctrl-c. Storing output in a tempfile solves this, and using a > ramdisk solves the disk space concerns. > > > If the process > > doesn't produce output it will still hang the shell, doesn't it? > > The "alias" or "shell function" solutions would run the generating > command in the backgroud, so the shell does not hang. Also, less > does not hang when input comes from a regular file, even if that > file is growing. This is a significant difference in behaviour > from taking input from a pipe. > > Ciao > > Dominik ^_^ ^_^ > > -- > > Dominik Vogt > > -- Pier Paolo Grassi --000000000000152c4905cd408ac4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I use this on production servers where i don't w= ant to alter anything that is't necessary, so of course i will not crea= te ramdisks just for launching a find command with a pager attached ;)
this leaving aside the issues with kill raised by vincen= t, which i didn't yet looked into

Il giorno ven 1 ott = 2021 alle 02:36 Dominik Vogt <dominik.vogt@gmx.de> ha scritto:
On Fri, Oct 01, 2021 at 02:04:11AM +0200, Pier Paolo Grassi wrote: > Hello, thanks for your insights, but I think you are kind of missing t= he
> point: I am already happy with what
>
> less -f <(find ...)
>
> gives me in terms of ux. Of course the output is generated continuousl= y and
> it is stored in ram by less, having gigabytes of ram it doesn't re= ally
> matters how much output is produced.
> The only upgrade I was looking for was to be able to do ctrl-c to disp= ose
> of the command even when find had not yet produced enough output to ma= ke
> less satisfied, the infamous one screenfull of text.

1) This is not an issue at all if the input comes from a regular
=C2=A0 =C2=A0file.

2) With "less -f <(<command>)" it can be solved by artif= icially
=C2=A0 =C2=A0generating at least a screen of output:

=C2=A0 =C2=A0 $ less -f <(repeat $LINES; echo; <command>)

> I fail to understand how it would help me to create a tmpfs and make t= he
> long running process write there instead of to a pipe.

There was some issue about the generating command being killed by
ctrl-c.=C2=A0 Storing output in a tempfile solves this, and using a
ramdisk solves the disk space concerns.

> If the process
> doesn't produce output it will still hang the shell, doesn't i= t?

The "alias" or "shell function" solutions would run the= generating
command in the backgroud, so the shell does not hang.=C2=A0 Also, less
does not hang when input comes from a regular file, even if that
file is growing.=C2=A0 This is a significant difference in behaviour
from taking input from a pipe.

Ciao

Dominik ^_^=C2=A0 ^_^

--

Dominik Vogt

--
Pier Paolo Grassi
--000000000000152c4905cd408ac4--