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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 7668 invoked from network); 30 Sep 2021 23:49:18 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Sep 2021 23:49:18 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1633045758; b=KqWewqLHpYe1A1AnEm3IeJJSoB399dIhUiLN7om+TqFpYd9NUckDUQas1dUDvOu2ncJxi72wgA mK2OC/CKBd6SLxVjdADUVe1oNp3crf1piz37a9KqMjYc6ownTlxAghdCtmWL5gwpnAJga8ZEP7 8mSAlVW5enUHI0i8O3yEzFJRhxUPSh5Cm9eREFmYFidr906b9s+lJewIxeXHMDvpznjB4vZyXS XMZVSUXjKAEO4AbptaXOo/xhVWVmJ9xQ/hpo4D+hdktW+QbRYeYSFp5xcForvbhs5LXLmEbCKq y61U9bL66yt0VCA46XaLhfgMtYTOkGmQCiVIZYVdVbqlgg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mout.gmx.net) smtp.remote-ip=212.227.17.21; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.a=rsa-sha256; dmarc=none header.from=gmx.de; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1633045758; bh=1pW6bYMVSaXcozNs1qGK+iQYbSJ5yyECXpYovJwbzVw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:In-Reply-To:Content-Type: MIME-Version:References:Reply-To:Message-ID:Subject:To:From:Date: DKIM-Signature:DKIM-Signature; b=TcpYDNSeMYzwt1u3sImV0d8jfS+5Uq+mYt7n8VEUzGdza4mwI01H52gK7Bf05WW6eittgQ4oZn Q2sM7qFiairUrHtW+2YgXlbHRdKJ4au/loYVGJNntnweLh5uj1KKZpv0MW6pBS/eD8F7yT/Xs6 1ch9DZnqDgWw+UDmRKLILxxQfqUr5k/7kue+xA7JBO+4Co7IUP0/ixq69gUZB2HBv57ADzsKTs 2mBEr9bPGUtm7F2uHbczSI+T1PcZOaaZzmk6VYphEcCIiYeMRgJMy/FRLzR0TEqcfxMi4PX4jm NXnBkGeswJ9HDr0B/fWuVmorkguC4Ewo3OWMhjc7ZozpFA==; 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-Transfer-Encoding:In-Reply-To :Content-Type:MIME-Version:References:Reply-To:Message-ID:Subject:To:From: Date:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID; bh=Yvc4q5Mlxq1MhF5h93aIXXQqtBQ/HNlVNQNpXVITR1o=; b=oI9avK/BqKf9L+TaZhMbr+hfz6 O88NbJprh5/S+IrpAM8gkIxJuN/4JPwZrffYmtJwkYrTa1Ava+Qky+UYFbnvNbOaVgZ81sKEM9h3f 6gQndVupo6KiTPesaEPNAnQBMG8i0WWgilF6SMcT0awReacTfQMF0Kqr5bGSspX2D3unw5QYqiZVe UR8z3nTLP/BkcknElIXYpvdEWKC4q3oIoP5jS4Yk/5pzQzEqwlg57LGwKHZYPTBti7CyNUk+it6iY 5YezyJOiDu3AbhPcBcdKV3vwze5PWxgHMf4ZLtauAsjpB1DSkXmCTNqUvHvSVBqAEJKd8ig1tYsNs bvxUDrLg==; Received: from authenticated user by zero.zsh.org with local id 1mW5ng-0004v5-3a; Thu, 30 Sep 2021 23:49:16 +0000 Authentication-Results: zsh.org; iprev=pass (mout.gmx.net) smtp.remote-ip=212.227.17.21; dkim=pass header.d=gmx.net header.s=badeba3b8450 header.a=rsa-sha256; dmarc=none header.from=gmx.de; arc=none Received: from mout.gmx.net ([212.227.17.21]:50057) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mW5mm-0004CB-BZ; Thu, 30 Sep 2021 23:48:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1633045699; bh=1pW6bYMVSaXcozNs1qGK+iQYbSJ5yyECXpYovJwbzVw=; h=X-UI-Sender-Class:Date:From:To:Subject:Reply-To:References: In-Reply-To; b=XfkQDZR2l51DFJ0bX08Zby/cVfromE0wV6WZYYzFUny+GUpoAAN03JoT+ho6ameLH wzWfqwBz5sHFMXNhuMlD1YXDOSNSCyx/XEfkg1bqJ/LLRu+u+qCoDUzBLGcvbozPyj PgxQSU6iR8NpiV8XnlbqZ2iUqq0OpoJrtSi06jX0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from zitrone.obstwiese ([46.223.163.202]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M8QWG-1mRi4Z1sY4-004X3i for ; Fri, 01 Oct 2021 01:48:19 +0200 Received: from luthien by zitrone.obstwiese with local (Exim 4.92) (envelope-from ) id 1mW5ki-0005wD-76; Fri, 01 Oct 2021 00:46:12 +0100 Date: Fri, 1 Oct 2021 00:46:12 +0100 From: Dominik Vogt To: Zsh-Users List Subject: Re: less with subprocess Message-ID: <20210930234612.GA21179@gmx.de> Reply-To: dominik.vogt@gmx.de Mail-Followup-To: Zsh-Users List References: <20210927233143.GA16620@gmx.de> <20210928185230.GA7495@gmx.de> <20210929130217.GB25513@cventin.lip.ens-lyon.fr> <20210930191706.GA1641202@zira.vinc17.org> <20210930194800.GA15560@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us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HfKzXdtLWD3G1XKDJ1K2D a5CfkO6HiU7qNYiOjufRcSCO8rtyR4iycF4Iw0t84yFArMPoh7qr7ZFWoPm4pg9tPnECYG+PO 4KGTrDOdEUbhuJ5o5Kx5At7MrnqDbUDVbH90ELjp45/jXYtPIuu0fEfWnfQ5+C5K9OJBwwLEi CVnSmqIDjbbrYXYwoyO9VNky+hWHFCWkEEM2zqtxvGGbJEEY7PfzX1TvxDOJm1RyKpC65uCm8 qsvVJpojdxQ7JrcATELMbAzW0k8xQ7OsM3O2eaoWSioZoGMy559OtcOU4S5P7J+tEwsXz2bdn AHvErx9v2eLGW5cr2WLh5yA9HStqlT2+nhVMCC7JaS4gFQF89PRqCyDL/0eY1ANmDtTevU/TP XV85cT60Cmnk8s= Content-Transfer-Encoding: quoted-printable X-Seq: 27192 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: On Thu, Sep 30, 2021 at 10:59:25PM +0200, Pier Paolo Grassi wrote: > writing on disk it can eat away all the space I have on my device and ma= ke > other processes that need that disk space to fail. Even if disk is cheap > doesn't mean it's always plentifully available If you don't want to consume disk space you could use a ramdisk/tmpfs for the temporary files. Less will gobble up memory anyway if it gets tons of input, unless you give it the -b or -B option.) On the other hand I wonder what kind of command would generate an awful lot of output quickly which can still be overlooked manually in less. I mean, if you're only interested in the first N lines or M bytes, you can pipe the command's output through "head -n N" or "head -c M". cat /dev/zero | head -c 1000000 LF (With the global alias from an earlier message.) =2D- So, what you really want is to put the producing command to sleep while less is in "view" mode and wake it up when going to "follow" mode? That somehow contradicts your initial request: >> I use it like this so I am able to use ctrl-c and +F inside less to mov= e >> around in the output already received ... >> ... and receive the new input received in the meantime (with +F) ^^^^^^^ ^^^^^^^^^ ^^^^^^^^^^^^^^^ =2D- If you *don't* want to put the producing process to sleep, it sounds a bit like "the command shall keep running and buffer the output in a magical bag of holding while less is in 'view' mode". =2D- If you don't want the output on disk, the only options I see are * either do not generate new data in the meantime * or store it somewhere else (memory/ramdisk, other medium) Ciao Dominik ^_^ ^_^ =2D- Dominik Vogt