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=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 23042 invoked from network); 20 Oct 2023 12:44:39 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 Oct 2023 12:44:39 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1697805879; b=hkTE6cRDmNkFnL69w/WMeGauOwZRAqHwDUFnLTlogphjZGr7qS+kPxVJbhltcFRRppSYdtYDD6 8Wh7g0Z0CBjo9MP+gwq/ZWCX12HWXNVIXXjw9/lCz6V5wluU+InbYWiHJbaFBYlR1LWmhR5M4A l9GYAxZPoMQ4jR7voZEuC22nGMIqoi+joiL6TmudiJOX9fs/OIfk7sAS4XCsyk+zDl/WB3AhV5 XCJ/ITiKohlsS/wXuip7FWS9LzUYnmtZPLi3xMSOcHPki3R4JCm1r5RzA53gaFUL16ierFFdmQ yv/qVghwFHBNTDDjMz6f/AtvwIU6f5o7ByjzW6gTQXg5kg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (hekla.abc.se) smtp.remote-ip=158.174.61.227; dkim=pass header.d=abc.se header.s=default header.a=rsa-sha256; dmarc=none header.from=abc.se; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1697805879; bh=msibpnVf26oW/mHAnxT+9v8c1IC/zGkmmn7fRBejUw4=; 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:DKIM-Signature; b=hsalonsfPw1xR7NPGmKWWs9YHWbSpW+hchl06Vcw3voPm1lJajLGrk2dxNA/4xj93bURb1hkCh zH8HhtG/nhp9s1AnwGcAx7vZ4NnbqvU+fAIjFKkCuUpBkUd0rQz1UJWjzEZH8Dt0GsHJVEfJ7m 8Sa+5KXcsS4hDC7o/iEmo+uX276iYhavKH+hGKhEeLNBxqLV1CCRI9BXEx1Dg/OpgABPvGvLGv oMSjCngYwnrTHCTU4EP7irG/bhatAMRTRRtG2pL6vQy0bvSthfQkN78r2D7tngYI2DPtvhjNSk VD2ZvDQ87eP5l+ton4X4IYgw69x6pefgCrX+KAlvxfMHpA==; 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=PvKBG/5S/Qu9NVgXy1HvyWjFki7iDt6Z6W3s4CYIns8=; b=g7nP+4ety9M11EigME6qGRd0ZZ FH9nLkV1BZbqxqq6gfUTTlkomK8J/xaUmurlIzIapIrojZHbUf/u0FYSa9xVBaTsXCjSCp8ZPLRDQ OZ+D0rWUJ5o167vpZsUKMlZhm6Ocmnx3vaVRKvrQ6vdgrJyxizM9W+YAxSvHIug2vqQKvcMs+evAS u13d40+j5bqgPv82rm74ybBAWOArjeYdmMDoWezfxMevGLPAUlmvcrUv0V66hHrvYmXPmFqhMo7Pp VJe2D5ajouh6KPgTHou5UMJwLqK0mGZV5hIp8yMrDoGRVzrcLUHr1Ph7hf6xStPSg2CH8pmYDoOK9 4JZWrLuw==; Received: by zero.zsh.org with local id 1qtorl-0002b5-74; Fri, 20 Oct 2023 12:44:37 +0000 Authentication-Results: zsh.org; iprev=pass (hekla.abc.se) smtp.remote-ip=158.174.61.227; dkim=pass header.d=abc.se header.s=default header.a=rsa-sha256; dmarc=none header.from=abc.se; arc=none Received: from hekla.abc.se ([158.174.61.227]:23072) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qtoqB-0001sd-RB; Fri, 20 Oct 2023 12:43:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=default; bh=PvKBG/5S/Q u9NVgXy1HvyWjFki7iDt6Z6W3s4CYIns8=; h=subject:to:from:date; d=abc.se; b=VO0vCr72Cd5JY+UbXXQyZ1k1nPWWEvYJYbMvRc2Eant7yy1FwDIETiwztb6AftSeuJyY cBv9B1eRh26JpqxrhBAPLpuKgAoTBVFPuDzkLwKKu/n1eaYrmppDeeE1wsaYWDaWdwa4/7 jBdtQvXsceTICnUPQ0EiyhbUxdxlnxOLne/fm9K9ZHGNcK/638XCDz6GzH8dLCa5Omz67H gNR49G0Z5CsAZWc/+enBqWyKJaRlr81qDVtVEXl7iw4kV1w+rWMoMzcCQCqiIgklzSrKyh ANWF8y4abI6hyIrpJi1NwTzSOJqqK7V9Y4DxdTLPqzwLAnHUrPqDHwzH027HaA5A== Received: from harpo.local (94-255-242-207.cust.bredband2.com [94.255.242.207]) by hekla.abc.se (OpenSMTPD) with ESMTPSA id 667082bf (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Fri, 20 Oct 2023 14:42:57 +0200 (CEST) Date: Fri, 20 Oct 2023 14:42:56 +0200 From: Andreas =?iso-8859-1?B?S+Ro5HJp?= To: zsh-users@zsh.org Subject: Duration not written to history file Message-ID: Mail-Followup-To: zsh-users@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Seq: 29308 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: Good day, When starting a fresh interactive zsh session, setting HISTFILE and SAVEHIST and enabling the EXTENDED_HISTORY and SHARE_HISTORY options, the duration of commands is not written to the history file: $ setopt interactive monitor shinstdin zle $ HISTFILE=~/history; SAVEHIST=30 $ ls $ setopt EXTENDED_HISTORY $ setopt SHARE_HISTORY $ ls history $ cat history : 1697804875:0;setopt : 1697804897:0;HISTFILE=~/history; SAVEHIST=30 : 1697804902:0;ls : 1697804914:0;setopt EXTENDED_HISTORY : 1697804927:0;setopt SHARE_HISTORY : 1697804928:0;ls : 1697804930:0;cat history $ sleep 5 $ cat history : 1697804875:0;setopt : 1697804897:0;HISTFILE=~/history; SAVEHIST=30 : 1697804902:0;ls : 1697804914:0;setopt EXTENDED_HISTORY : 1697804927:0;setopt SHARE_HISTORY : 1697804928:0;ls : 1697804930:0;cat history : 1697804936:0;sleep 5 : 1697804943:0;cat history When issuing the "fc -W" command, the duration is filled in: $ fc -W $ cat history : 1697804875:0;setopt : 1697804897:0;HISTFILE=~/history; SAVEHIST=30 : 1697804902:0;ls : 1697804914:0;setopt EXTENDED_HISTORY : 1697804927:0;setopt SHARE_HISTORY : 1697804928:0;ls : 1697804930:0;cat history : 1697804936:5;sleep 5 : 1697804943:0;cat history : 1697804950:0;fc -W : 1697804952:0;cat history Is this expected behaviour? The equivalent of "fc -W" does not seem to be issued by the shell at any point, not even when the session terminates. If this is not a bug, how should I set things up to get the duration of commands written to the history file in a shared history setup? Ideally without using any hooks that runs "fc -W" after each command or similar (that would be a hack IMHO). Regards, Andreas ps. I'm currently using "zsh 5.9 (x86_64-unknown-openbsd7.4)". -- Andreas (Kusalananda) Kähäri Uppsala, Sweden .