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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9889 invoked from network); 19 Sep 2022 02:02:45 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 19 Sep 2022 02:02:45 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1663552966; b=QTDcIe+dClbesVgmsfE6OLruAIoa3LV6TknT+IuYeJrgNeZmVMxMRdHUNISJXV4pjYhf/hHOrf RrNwMzbxWHMpin9YqULQnuiKgcZKDml7ithlz5R0dHqAl0dWfB1y9W1DpPOlYBC9sy+gTbD4n1 1IgTLnDzYNSYNO7mdJBIquvwsZX8GwVbxN1dNBJZ06FtrFoCRq/BIPt+/f0CjCqJe7Ko1JdJlT vSitTDnQrtyF6ownhhpaFAy+GxW8jeEZJyYg8u9P1m4Q27pxXj9ZMVF53LULn3uF4mJbV/eRfJ RE4NvThM79NJZIfmmca8DrxofzVyx5L9HhtfoUm6ef+iiw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-40131.protonmail.ch) smtp.remote-ip=185.70.40.131; dkim=pass header.d=protonmail.com header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=protonmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1663552966; bh=Gpoox6C2jSpegrYD3uMgtXdqvPVeieXrwOP1NXcjHak=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc:From:To:DKIM-Signature:Date:DKIM-Signature; b=bY9BnxqgtLI6sKxA/xTGnbfHXixTm2P5xtjZJwt88IkFC+WZZBxuqpDTXvUnVAMk0dtinPWnLd AEjTAbmUkbGIcXefRC+Czo85/1WET66SEAQeXSw7yay9/WN0pynCKAOZkyIpiwcgvjKmuX3k6F fArTbqDGw1uYVixFKv61sW5rDBuI1EvHHzcSSH8s5NMEnrdFaHqkqdBEPkiNnCpNIMlKEoWVc5 5fKzKxqa0K9CC3AG4ocGhQzoQ/Msb6rbIRvTECzYzCtBMb2Cx6YfwnKPZ05IlWdjF8Gvsp+mvP X0AuDBlonvzyAhr8Zao7kJA+2IWcq/yYu2rthLnrZg1vtA==; 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:MIME-Version:References: In-Reply-To:Message-ID:Subject:Cc:From:To:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=+3OA58RpkuekFw0aUPpIB9Q4djBh/KyYQPpfuKIISSE=; b=dcFYDOZBseAj3gzRANVFkIIJfq yCIhs9ZioWrw0kxPUj6BHLB+ZHZsTAJ7s+Y7rUUuIeFIPHUgKPHnR3soVm4JVUJhN+QoR7OWq7BRG TVo22R9dv3mIfh7bXXofthtMWhJmM8wy+dfZCueEc7bkordPDFstSgaoTc1ZBd7FY9b5EOBaBjiMf KAb0LPARj+s361MkUdGQTFOMP5G+HB27Lxu8026yOo4X1lHn72MlCXyVWcjbnLx3m+p6+0ETN/N4Q QJODQZlDTrPoCt96mv0F0ZiXZ7DGK++LfdkuwfKyDfkdpHOCzhJxZuaAXJxgaXpaUM3cAwMf8p4mA AVsb9sNw==; Received: from authenticated user by zero.zsh.org with local id 1oa67R-000Dfk-GK; Mon, 19 Sep 2022 02:02:45 +0000 Authentication-Results: zsh.org; iprev=pass (mail-40131.protonmail.ch) smtp.remote-ip=185.70.40.131; dkim=pass header.d=protonmail.com header.s=protonmail3 header.a=rsa-sha256; dmarc=pass header.from=protonmail.com; arc=none Received: from mail-40131.protonmail.ch ([185.70.40.131]:40873) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1oa67A-000DKT-9a; Mon, 19 Sep 2022 02:02:29 +0000 Date: Mon, 19 Sep 2022 02:02:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1663552947; x=1663812147; bh=+3OA58RpkuekFw0aUPpIB9Q4djBh/KyYQPpfuKIISSE=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID; b=C/QDrVLTTb+GmQbky47YG9NUhmGUqnAdNLkT9IcVFb+EruofNRvhpmereVam9F2Av WBxbeTJjJD5MXLmmWuPykXBYBpx1drutFvLDwSNdSI2FJ09+5wuhohlEL5/SB97Lfv PtKCdl7ZUab3fuuKe7HpvTeEIj24RAqsKNN/ibCEWvfJlbOx1ZlKwKATeOy5LzDEj8 CxI3DHuZ4M77/fgyqB8mXohcvluJTNpqXAW9kKUuRJUA4/Enu5wXlvMb2Vx7hE4FfG VvZqAdkcNEMz/WzreF4OHCl7+OVvNREXBeB1UR0Kbsu3DPTl/AhAnynPUyq/fagCOK v2UreBlzNjQbQ== To: =?utf-8?Q?Lawrence_Vel=C3=A1zquez?= From: Julian Prein Cc: zsh-workers@zsh.org Subject: Re: [PATCH] Introduce ZCALC_HISTFILE Message-ID: In-Reply-To: <5af4a81c-1c63-4be2-8c76-8f3162a815b0@www.fastmail.com> References: <5af4a81c-1c63-4be2-8c76-8f3162a815b0@www.fastmail.com> Feedback-ID: 54984029:user:proton MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha512; boundary="------514a2ec41eef4c9e19ccac1c0aefd5797e6669c57df8cd62281534177706374a"; charset=utf-8 X-Seq: 50648 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------514a2ec41eef4c9e19ccac1c0aefd5797e6669c57df8cd62281534177706374a Content-Type: multipart/mixed;boundary=---------------------95a79622911ca165745bd740633796e3 -----------------------95a79622911ca165745bd740633796e3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;charset=utf-8 Hi Lawrence, Thank you for your response! I originally thought about that too, but in the end decided not to specify= it as I found other sections where `$ZDOTDIR` is mentioned without fallback. It = seemed like more noise that needed. Anyways, here is the updated patch. Let me know what you think! Julian >From d3b75e7e2af95b89194f3d4f039df5b1ad1ba9a5 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sat, 10 Sep 2022 01:10:16 +0200 Subject: [PATCH] Introduce ZCALC_HISTFILE Make the location of the history file to which zcalc writes customizable through the introduced variable `$ZCALC_HISTFILE`. Update the documentation to mention this variable. The updated part used to differ from the implementation as it did not mention `$ZDOTDIR`. Signed-off-by: Julian Prein --- Doc/Zsh/contrib.yo | 7 +++++-- Functions/Misc/zcalc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Doc/Zsh/contrib.yo b/Doc/Zsh/contrib.yo index 0ef59dbc9ca5..96de5aa9bf8f 100644 --- a/Doc/Zsh/contrib.yo +++ b/Doc/Zsh/contrib.yo @@ -3972,8 +3972,11 @@ calculation is stored. For example, the result of = the calculation on the line preceded by `tt(4> )' is available as tt($4). The last value calculated is available as tt(ans). Full command line editing, including the history of previous calculations, is available; the history is saved = in -the file tt(~/.zcalc_history). To exit, enter a blank line or type `tt(:= q)' -on its own (`tt(q)' is allowed for historical compatibility). +the file tt($ZCALC_HISTFILE). If tt($ZCALC_HISTFILE) is unset, +tt($ZDOTDIR/.zcalc_history) is used instead, which in turn falls backs to +tt($HOME/.zcalc_history) if tt($ZDOTDIR) is unset. To exit, enter a blan= k +line or type `tt(:q)' on its own (`tt(q)' is allowed for historical +compatibility). = A line ending with a single backslash is treated in the same fashion as it is in command line editing: the backslash is removed, the diff --git a/Functions/Misc/zcalc b/Functions/Misc/zcalc index 480373345124..397aa3cc1d4e 100644 --- a/Functions/Misc/zcalc +++ b/Functions/Misc/zcalc @@ -125,7 +125,7 @@ integer _max_stack _push local -a _expressions stack = # We use our own history file with an automatic pop on exit. -history -ap "${ZDOTDIR:-$HOME}/.zcalc_history" +history -ap "${ZCALC_HISTFILE:-${ZDOTDIR:-$HOME}/.zcalc_history}" = _forms=3D( '%2$g' '%.*g' '%.*f' '%.*E' '') = -- = 2.25.1 -----------------------95a79622911ca165745bd740633796e3-- --------514a2ec41eef4c9e19ccac1c0aefd5797e6669c57df8cd62281534177706374a Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: ProtonMail wnUEARYKAAYFAmMnzZkAIQkQlAVjb6SozwEWIQRULEFlmx2+d86F9RCUBWNv pKjPAek1APoCXtS7zHOu8q1vTd/jAywKhbu/WOQ0m3mI8j+4xR8gFQEA1usS uErbw0lJR+q9sFnx7aIh9Vs761y2/xzMgOASsQk= =Pmp0 -----END PGP SIGNATURE----- --------514a2ec41eef4c9e19ccac1c0aefd5797e6669c57df8cd62281534177706374a--