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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13354 invoked from network); 7 Feb 2021 16:57:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Feb 2021 16:57:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1612717061; b=Ur08/4/zVOpmimZyf8QGLkBgneecMCFwtDYFeEBnCdnGQD7rqQq9yqng2sunyi6UGS21w2zoVE 0Vfg4PkMVdKgR0NcEMwIuXSqmJx+V4dEbTUIFzwXRSi4E3oaSpRn9zZXlTrVyQucYzLOjTPaHc 0l3eqAv9b0xNTeCFbpBdBMG5b3qwsxaZ58tNakFzzNUzwTDYb70OFzPJH9wrOVFMvph8f4rFqV cejMnJLUSoqgAw+oSDe95TbqlQYjYESGE8t7QQSTHcMLI3rbN+rPUp+plfHmlKz9b9etTZ3mt9 bwpjRHUhTvaADtCQ2fPpUTbYNkdE8fdgw5VTGTPS2A8lug==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oo1-f51.google.com) smtp.remote-ip=209.85.161.51; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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-20200801; t=1612717061; bh=JD8KNcFmJbzk+ZDFp/k1+B9xhsN8zLlxt4OWD0Kc3qY=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=NF/4/2RNiwpELkWy8gE/qQKfHe8xEzHvVKsTV3UGHJmCDhe/QYJdn6/fsKX3vLj6+g8nxyALTv SdylS62UZQly7t1cCW+lVeUAORhQNm91kGCWZ/qpg5Hgt9qt9lq2Euz2ECuzUAEcjuNkxNxf1p 6pTg0dPXV8/0kdN5pBQJ4KarEESW4vi73zHJp+4sKVL2fYdPnY9t30YFn51FbkTxf7rlT/+3yj PmrvcRIVj7YdUN+VbZUnl8BZf2YwNDIxgfTTsi1bVAGsrl482WHEy0mfOhCUmd0X+mVQQciAI5 cPXrX2NIP4Q3P2iKCCrPJOS94gSr5/fBgi5p2bbymiS+jw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=jUjPG3o9BOsiHsCuD6Uq+SnQ0+4Nv6X83epEaPFIOyI=; b=RefgpTnyGjzXpp/VibN2butm12 YDuPz9aLgPJ2f1RZK1dl8XKalbMKs/3qFDLD3C994L/Md+1UGolAh/GUwXbWGjQaRPjJrTXJ1TEPv AH4qXtvEe+7kG7n7Ap1vVIT8DjPABD1n9bS/05QpQKwbKs7iM41oakQX+sQNveZJ8fq8/czC0zxTW WIDnUe5lSMn8t1Je0A0Ri/47x5vKt/l4AgMSx39Em7HqXysNTs+hu+0x55cEwPFhUOtMVjpE3Th0O EpwFZjenu32gcBsHjlvIz2Kww/a74sfRNTLYnXMV33fgPj5RzCP0AgkdfaV1rmsc9ZkcSv5/nnZci aSFHMyKQ==; Received: from authenticated user by zero.zsh.org with local id 1l8nNT-0006Vb-9T; Sun, 07 Feb 2021 16:57:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oo1-f51.google.com) smtp.remote-ip=209.85.161.51; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oo1-f51.google.com ([209.85.161.51]:46563) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1l8nMx-00068E-Mk; Sun, 07 Feb 2021 16:57:08 +0000 Received: by mail-oo1-f51.google.com with SMTP id 123so2894642ooi.13 for ; Sun, 07 Feb 2021 08:57:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jUjPG3o9BOsiHsCuD6Uq+SnQ0+4Nv6X83epEaPFIOyI=; b=h697aXyLmsH8W2IrEtL7YKPXv3wrVFrFbaFxZmCp5J7Ka/1ylRXr0N+qyBjJg5Uh6C 6V8pufxlo1p5aj87IOrK8Bx6jTcSFlY1Fy0ZtGF3I+3c5tTo6vfE0Vzg9w0qy6moybEe byyztfFQZqbmYsCkerFgud7Yefvu5L7UEx99V/7pIKtbgAXpMXo5LlytFkUBKywI6wJR cEL1p811lYj8S+v4cKVuQ7NJNf3AGMbzpsSpglLpnybgzxl94iUWiCxXaVsg46FkSuaN Z5GNogtLvfZQGkkBAQzmdXN1YRXCQN3fDKuYMgw9w3ESK+UBXOvemiDB252Bln5g3EAQ Jmtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jUjPG3o9BOsiHsCuD6Uq+SnQ0+4Nv6X83epEaPFIOyI=; b=SHNSkx3+1htTt4EfOEThFSuEPAmnFKj0OjHk+0gOwEga87QaZkRATV1a7FoRvLGqK8 /n/0xm5fLHeZM1oSOOaChsun3M8yKuD+krGTVneAIann+N5yC1BIYYTLRnGrwuWeAsJ9 mIwu8u9t7bPy3x1nFuUyfN89pUNo1GvD/QLPRDNmP/fys9ZvFOGM0FsUVfzg23YB+hja 6hi/bY+xvQJOmYQsWUNEte+Hn0M5h36GbQIdx/lrLCLBleoJ0RQXNeO4x3QvQNzWjLMg K5K6K6HhFzMQhgtxavFnXF0l5sWOBNb183L/J5KGF9gEISNHt2rkTJlLsic37vf50zIY LTAQ== X-Gm-Message-State: AOAM5325DHut7WjK/7KyEW7cQwQeOEylm2iaK7gfr0IJvvJdnWcLZCtx ZWxKlT1dcOkoB5n8d/pwH6H6SmgKE4IIsQPTUQwMwQ== X-Google-Smtp-Source: ABdhPJxbdtnFNkrQfpzuzxzObO10p+AAsw0E1NOzTqA4OM1Td/uxg83j7JUeXWw8PLC0NjX96VxgPAbOmfWu69fzdrw= X-Received: by 2002:a4a:da19:: with SMTP id e25mr4409469oou.29.1612717026271; Sun, 07 Feb 2021 08:57:06 -0800 (PST) MIME-Version: 1.0 References: <453532ec-a8c6-a3b6-c44d-9107e98250ca@eastlink.ca> <52C36B95-58AC-434A-93BF-88E77464C04B@larryv.me> <0d8b2865-4fbf-f779-cf69-def7428dd6b3@eastlink.ca> In-Reply-To: <0d8b2865-4fbf-f779-cf69-def7428dd6b3@eastlink.ca> From: Bart Schaefer Date: Sun, 7 Feb 2021 08:56:55 -0800 Message-ID: Subject: Re: command recall To: Ray Andrews Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26472 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: Archived-At: On Sat, Feb 6, 2021 at 3:12 PM Ray Andrews wrote: > > On 2021-02-06 2:08 p.m., Bart Schaefer wrote: > > > > ... it doesn't update > > the shared history until the current local history is ready to be > > written. > Still, hitting the up arrow is doing something is it not? To go into too much detail, there's an unsaved dummy history entry at the bottom of the internal list, to represent the command the prompt is waiting for, and the history file isn't consulted until that dummy entry is either discarded (accept-line on empty buffer) or ready to be merged with the file contents. There are all sorts of reasons for this, including being able to have a stable numbering scheme (keys in the $history hash table) during computation of zle widgets. > '$ history' is up to the second That's because the order of operations is 1) You accept-line, so the pinocchio entry is ready to become a real boy 2) Consequently, the history gets merged 3) The "history" command executes