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 80A3B2CA32 for ; Wed, 13 Mar 2024 16:05:48 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1710342348; b=Ub7+nHZ1bOWqQkuZ2d1ON2cpxJolvLkNp2tCjOTFZNv7ZSLI+aFMvPBQIqAkwYa3qccbBiPkwc 14RaNUh9c8/wNfRu1E2JCJS2XRNATc2tE8Xc86mJ/0V3b6mAUmUeFZbT1NpDwboi68lkUYAv5/ WHg4qq56+TbKQRWvHx14bIGKs9SvkjLlc4TKeUc9Rza5E3KiTYwP4qvguCCWLkyhlSlSTGoL0O on59M+qMTpOBzETrxOWlEsuL+SQAY7M20yWKXYRvP4eVZOXompWC8jPdJx8eXpR0IaBlpQPL9j 2hr2eXkGPyQOFWYES9Xesd0B+fod191MsoDTYL+DYhXyoQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1710342348; bh=43fsto4f0rqdPKnYCuqqqHwgMZnPMUe1OPPnx7ANIw8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Subject:To:From:Date:DKIM-Signature; b=T7cstuc8FUIaH0O/AyFGx1kPPFq6NZjWt22Qx48eTXbRWqCJ3pcsL3hOt/TspaH3+q6GTAdsdc OREjgu9F9JkwFfpgB1qevMalaUwfbuYEr1zyHcKuNfTDq0AW55TNt2kaB4/4B66rMk9iyIx9MD yrlbN/yiYlE7985dIKe8v2zM20Cfe/y1IF44PK3yFYven+BjzYfAdvcW50TrpnP80pbfmdb4Pz UOhNGa+XUgzNlGlg63vSjGPEibVz+mIYBR8TrProXqZjxpzUOSTy+2bi7BLNgBJW+U3CYv5rH1 kp5mBUFMRWqVFFLtSyhmG4Pr/OsKoJZhXBc+ppvjblf23w==; 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:MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=ApbKcMh506fnHc9+7esXYVXvPqnLvIR+SEDwjhfY0/o=; b=J3m7BTUUZPujGKdkUCRlgb+SiJ rXUrgwUynnp6HL6zwZoKL4SMQl+52yuIllT24pDOcQDd0yb5NqY9X+o27ZpJ1n7OBm5dSRPpker0l kPE0l8IKBt8VSNf7fpqhfAJsYGMeNzUMWwG+ZB67OEQIdNigL4MR2EOw3ry642Ry1B4PGMhjNPZnd zbomqo8cc9NuDKqdL+i0LoKsdUd5ST1L+F5auhMnJEQ/9qxqZBg6R52KPISFTkGKWBUuFWuV3l2mB SkmW7U9OB81IZhWWu2XY7HMX31jLlVcH74OjLtqofVDKBb/BHO4hiBwndA11xrM1+VYPfL8MVBhSe 00Smej7A==; Received: by zero.zsh.org with local id 1rkQAt-0003Bt-J2; Wed, 13 Mar 2024 15:05:47 +0000 Authentication-Results: zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:40214) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rkQAJ-0002sL-Uh; Wed, 13 Mar 2024 15:05:12 +0000 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.97) (envelope-from ) id 1rkQAJ-0000000EiMV-2DPT; Wed, 13 Mar 2024 16:05:11 +0100 Date: Wed, 13 Mar 2024 16:05:11 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: issues with saving history to file Message-ID: <20240313150511.GA3498572@cventin.lip.ens-lyon.fr> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.12+69 (354c5b11) vl-149028 (2023-12-10) X-Seq: 52748 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: With zsh 5.9: cventin:~> zsh -f cventin% HISTFILE=~/.histfile cventin% HISTSIZE=1000 cventin% SAVEHIST=1000 cventin% setopt APPEND_HISTORY cventin% true cventin% exit cventin:~> ls ~/.histfile ls: cannot access '/home/vlefevre/.histfile': No such file or directory However, if I use INC_APPEND_HISTORY instead of APPEND_HISTORY, the history is saved. According to the zsh(1) man page: Note also that the RCS option affects the saving of history files, i.e. if RCS is unset when the shell exits, no history file will be saved. But the difference between INC_APPEND_HISTORY and APPEND_HISTORY is not documented concerning this point. Also, I do not see the point of not saving the history when RCS is set. 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. Without INC_APPEND_HISTORY, the man page doesn't document when precisely the history is saved. For instance, what happens if one has a "print -s ..." in the .zlogout file? Moreover, with INC_APPEND_HISTORY, "print -s" does not put the entry in the history file immediately, only after the next accept-line. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)