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=-1.0 required=5.0 tests=FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25907 invoked from network); 20 May 2020 00:27:17 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 20 May 2020 00:27:17 -0000 Received: (qmail 22110 invoked by alias); 20 May 2020 00:27:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 45859 Received: (qmail 10940 invoked by uid 1010); 20 May 2020 00:27:11 -0000 X-Qmail-Scanner-Diagnostics: from mout.gmx.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25814. spamassassin: 3.4.4. Clear:RC:0(212.227.17.20):SA:0(-2.7/5.0):. Processed in 0.757622 secs); 20 May 2020 00:27:11 -0000 X-Envelope-From: markus.naeher@gmx.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at gmx.net designates 212.227.17.20 as permitted sender) X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Subject: Re: Feature Request: fc -C to clear history and reset counter To: zsh-workers@zsh.org References: <48e95c73-3a98-a4c2-7e0c-badf8544b4f2@gmx.net> From: =?UTF-8?Q?Markus_N=c3=a4her?= Autocrypt: addr=markus.naeher@gmx.net; keydata= mDMEXi1PPhYJKwYBBAHaRw8BAQdA5mC+PjCn5mz47ngBjY5+8r9YeloIjigNtKiHPaSlvAW0 JE1hcmt1cyBO5GhlciA8bWFya3VzLm5hZWhlckBnbXgubmV0PoiWBBMWCAA+FiEEVnCH2Hg5 cG3BryclHHm+zifSIesFAl4tTz4CGwMFCQlmAYAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA CgkQHHm+zifSIeuzrQEA1dCwtJCeDcc20kPViqt5ekqidR3gpW59obGT+xvt5pgBAMyawHqH pa+PH4Mr6+9Sh/6u/yI01WwvGAK/m2CJT6sOuDgEXi1PPhIKKwYBBAGXVQEFAQEHQO2mlMor hTTZq9WUdRZMc2NhGaapZ9ZyaQesF23tQGU7AwEIB4h+BBgWCAAmFiEEVnCH2Hg5cG3Brycl HHm+zifSIesFAl4tTz4CGwwFCQlmAYAACgkQHHm+zifSIes1TQEAs2SYqsBfB++PKJIFcZdh 2xkH5YBaSN5L8hepGnb8mhgBAKZqF4jEppwZt0/c92ymZu2EssLB2WIOx+V6LazlYMkF Message-ID: Date: Wed, 20 May 2020 02:13:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US-large Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:vcMxtElB8OtahE1+Z9J9ZWSX0q9z4WQi8q0+7Gu7421regBRtr4 PqWSzJskQ1l3b5Z3zF67QspXLZ7hzMtu4TF2oDaHmmtqvLhCz5SuJzvNjMuEwHvIux/EKWQ TB92yaWwNYFvGuYLerGAOiqXK+7mZZnu7DA/Civ+hbgiJilVHUMUVfgM27hJh8b3iJfVnLd kJtAt6OBrBNGMKw6lt4TQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:l1M815SrIuY=:FmoHufjAzCcm9PgTXuU+Mx lZvJ7+dHQf/V6HLqnSXhyhVkzbfUiPF53ncGT7RmnbAYjhqodBBUBlKR1uY5wVWVtKbjF83oi Ye43YG7zawORZZUN6SJCMzCqSuXKS3T0LEr/c5CztsaqhXk2lEKegkAI0BmLgYwJH7LrhewP3 eEzqgoeRfwBi+KkrRQIdc+OUOj7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kM6jSbr7tc 1xPaecLdprKCDLNsX On 20.05.20 00:33, Bart Schaefer wrote: > On Tue, May 19, 2020 at 8:53 AM Markus N=C3=A4her wrote: >> >> I'm using multiple individually curated histories for my projects. This >> keeps the history short and clear. One history (my "default" history) i= s >> for my non-project-related day-to-day tasks. >> >> I've learned that the corresponding zsh command is "fc". It has -R (and >> -W), but it's missing -C for clearing the history completely. > > Zsh has what I think is potentially a superior mechanism: fc -p / fc > -P to push and pop the history, respectively. > > fc -p creates a new empty history, resetting the counter > fc -P discards the pushed history (if any) and restores the previous one > > So you can simulate bash's "history -c" by "fc -P;fc -p", with some > appropriate extra arguments to manipulate history sizes and file > locations. > > It should even work to do "fc -p" in your .zshrc file so that the > "default" history is always empty and > The initial read of the history file goes into a pushed history. I would not call any of these concepts superior to the other. Different people just prefer different things. I've read about the push/pop feature, but I'm more the "throw away the old stuff and start over" kind of guy. I'll never need to pop. :-) Can you give me some advice about the "appropriate extra arguments" you wrote about ? My goal is to really start over, having nothing left from the previous history.