From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id 26E2125EB2 for ; Sat, 16 Mar 2024 16:41:57 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1710603717; b=K05Ky1Lu2aEsRU/EOqD7Yk9AK9R0iTFoXorDcEIRH0jOknTbooLLe5NkUqCqPHbFmL6nbZprSU KnaywI7EuqvuXC9hRwUcgF9Aukr7ScPfn8HvkPt3G64WRv5z9RP/lVxqwDzLjy2oRrg4H2Y64G mt4z9n5fngCjTt12lNIIkXo41lt73iO8DNzysQaPI3QFjRLVg7EyZR2ByPSB8B3Sz6w0prVH65 v2H3BAglsIDrzZrvcKxebQV4neI2UM0vqSyCrZmeqQ9PiS+a/Lgmpls5syrppZxnNVWH0IUOBh jzB5DtN0HMor0AisHrgPi4kuXlMdxzfwTN301eMAymQRVw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1710603717; bh=xfoGV/X6Ln1uVTj5gWTbh1nDpYq5JFtei5qrktHfE8g=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=ejJvDEPSbkX7iR30wQJVu3P0NlauguB+4EzmTyYsdad/WzjkjOrSGFiwKLT+Ev7Q4kNuzr8H88 uTFrgVwY77ylKPf3UIwZrhgXV6YV7f0Fw6iSb3E2c6oR2NlyvZLwmokahVVL5NaW+YDyWCS/Hu jmFoFrdI02v4XT6P1lBac3zTkJjfK/W2poX+rpnVMRH6kf5log1wdemDNGywWZpCwXcMbvheZl gxMu3ZhMRndJUBAcpMDZ1l5acTpcE8X8FpjpTAFRJDPZqffJZGRIyKb8qi9k3y2K/iInATrpzC Nwen2i3fgOXHTZ7dx+T3CeZr/+LZl5BGu2fS2RpIUkUcfg==; 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: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Rv1W41HHK2PWRN2n1z+LWAjYoObRkm46jn2HBaK+lBc=; b=W8x4xULf5rWwzmsWtnS3nek6mI rkTQdVfZr7+r5NiQZFbXxbUMzqfmcROru4afgUFLYaPhO4BzPcGzB8EK83aQdlISzKu9jZpK/9XXr 61CRZF+m2gXhKu0ac6CShDjJzK1ag3gXKhqJEGP4AfavN2oJyCCz36gG7onQdgvWayVT8ZjUEmiZ6 4O1o/hQSi+UWQIq6oZMqvTTgfI4JL0R/vJ+F92n4K67wgsN9cR8F9d0iak/noBCJZHK5Y2t159lqC NtjfORu5y2iS0QpmIT449tY7uBPwCtRIF9zhJ9hujpp8T40iMoMoKgVwyKrMSOUgzPWaLcgeW7WIi ZjiaRLsQ==; Received: by zero.zsh.org with local id 1rlWAW-0007fO-So; Sat, 16 Mar 2024 15:41:56 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f47.google.com) smtp.remote-ip=209.85.218.47; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f47.google.com ([209.85.218.47]:43172) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rlW9v-0007Kk-CI; Sat, 16 Mar 2024 15:41:20 +0000 Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a3ddc13bbb3so758097566b.0 for ; Sat, 16 Mar 2024 08:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1710603678; x=1711208478; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Rv1W41HHK2PWRN2n1z+LWAjYoObRkm46jn2HBaK+lBc=; b=PIRVIpNSAkblITN1thLGr1Y3chDBaciGmI/nofmz4UUPvrg0eXNf8uDPUm1uJIHtq9 Gc+hOqGGhPnQYRVjbu4j4tSlvJnFDn4SM3cTTic46Y4AUSg+JxT8naDMcyu/Pzr0SO3G 7B3gogIOiQGm8I6tPuZuoW4vxTK8oC/A6EFvyTU1QlJoFuCI1bZ1DwRl/mlt+Ljn/YVu MsdYAaDBm91EyFbM1M4QVksaQlCSShvuz0WSBLgPcZ3l/H6yyBzcITAYAuzQAuDw3Xl1 RBYCMHfBvgXf5IsMbieSbI0MllVYk1Gt48AGXPdsjK10SfPStpIlXtsJe1KvIPvd/Bez OJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710603678; x=1711208478; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Rv1W41HHK2PWRN2n1z+LWAjYoObRkm46jn2HBaK+lBc=; b=sXp8OYuishT7+HXfeYn2aFgY4eQrQ6e72xJ6vXwz4fqTVMJne/KehZlFzkSwQHKC/t /auTG8vNvKpAnroViUN9j+MhNR7TN+Xhk/fHHVJLXMpbBal7s8cASbz8YGZ8owP4Skw6 jZywWL2atgMA201rkgVXy4lSwVV+FfA9uxfLa5bUWZx8J82SRapZoYPM9JZCxFwz/4NE n+nhpANQsAomLUvTJG6SyRjaOXqpjjQqTiWXXcZofyB2KYAMZVfpZkrwIelAlBoeAn9u uvyJ1AB7rnJfKdR4+K6S5zaojhChtjyIBiBFHVEFq8L/CLAKPu7ThXz/2LDqi5+ZNlcs XY2A== X-Gm-Message-State: AOJu0Yx3ZIShd/WTRuv5w5gHkfh5W0zX/mIdfjRq8+EfO1D83WDVWL+w MPw4u2g/IO2JrgJK+gkLSO8EjrdhA9Zv6JgZHkkOErhwe+bVkIuJPlp+KWAxepmZox/hoXVcL80 H8Ez+QxAUgcTTRfRyEvyFY2zYq0/SV4NPyKbqs2/DPC0yw14= X-Google-Smtp-Source: AGHT+IH5pe1yEfu/xPJUgQfrwV1A4IIZC2exYv0t60CnOGEIoI57FpDrkOqt3DN6CL+yVKuek3b9F2omA3wVjuEqssE= X-Received: by 2002:a17:906:db05:b0:a46:2b8b:e381 with SMTP id xj5-20020a170906db0500b00a462b8be381mr12937215ejb.8.1710603678343; Sat, 16 Mar 2024 08:41:18 -0700 (PDT) MIME-Version: 1.0 References: <20240313150511.GA3498572@cventin.lip.ens-lyon.fr> <20240315124750.GB3738413@cventin.lip.ens-lyon.fr> In-Reply-To: <20240315124750.GB3738413@cventin.lip.ens-lyon.fr> From: Bart Schaefer Date: Sat, 16 Mar 2024 08:41:00 -0700 Message-ID: Subject: Re: issues with saving history to file To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52764 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: On Fri, Mar 15, 2024 at 5:47=E2=80=AFAM Vincent Lefevre wrote: > > On 2024-03-13 21:52:44 -0700, Bart Schaefer wrote: > > On Wed, Mar 13, 2024 at 8:05=E2=80=AFAM Vincent Lefevre wrote: > > > IMHO, HISTFILE should just be unset by default; but if the user sets > > > this parameter, I suppose that the goal is to save the history. > > > > The goal might be to read the history, not to write it. > > To read the history? The zshparam(1) man page just says "to save": > > HISTFILE > The file to save the history in when an interactive shell exits. See also the part about "when exits" which is clearly also incorrect. This entry is outdated. The shell also initializes the history from this file at startup. I was differentiating zsh -f % setopt RCS from zsh % setopt no_RCS In the former case, the history is not read, but it is written. In the latter case it is read, but not written. The point being that merely setting HISTFILE does not imply that the goal is to save to it. Further, setting SAVEHIST=3D0 will truncate the file in the former case and leave it alone in the latter case. There's no single setting that covers all cases, which is part of the reason we've so far had trouble agreeing on default behavior. If anyone wants to have a go at cleaning up all these documentation inaccuracies, please do.