From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 0a0114c7 for ; Fri, 3 Jan 2020 23:47:38 +0000 (UTC) Received: (qmail 2248 invoked by alias); 3 Jan 2020 23:47:32 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24596 Received: (qmail 29960 invoked by uid 1010); 3 Jan 2020 23:47:32 -0000 X-Qmail-Scanner-Diagnostics: from mail-lj1-f182.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25677. spamassassin: 3.4.2. Clear:RC:0(209.85.208.182):SA:0(-1.9/5.0):. Processed in 1.971896 secs); 03 Jan 2020 23:47:32 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.208.182 as permitted sender) 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=80fHwJdUFaErUmC/en4Sa7LBdsbePQPuzCvDPZei3gM=; b=T7QT8EVK3IAmGPdFtVqmLPqWwe+pMsW9KOPKU6x+0AYeiQ5KCIjO0x1zA5j9x9LjN/ YIa1PMagVQSDIxOC4UiOKQ2wh/Gy/eNwtEa/0Vil8QKA6Wi/QdkVubbG7jhFnQw168/c A33i5bF7owVoox5yd6nnreoGATDP6cp6S7CXP0Ci0/4R9/3BPh40PwqQKF5KSaRhSEvP qPNuAWeDGGYuK2bwiZA39xKjsBZ8lt3wpUVk8ipI+F9UKO6hlWPYPa7s6ZMdiSWZIx7A rMC15MbEXbdJrYjeiEfFaFrMYAoR4DmKhLNaXU1kG7JvaJE238ECe+GyL9sa8ge+sq3G JKdQ== X-Gm-Message-State: APjAAAXkk9Lt9N93hDv++cZQMQTU9jDNPalNImPGn5U263tXJrfufSob v4v/sNR4agoGoMhorHXryIYIOMlpS93Apas2vP3CUA== X-Google-Smtp-Source: APXvYqyDp5vvZ39Rby3t/FfEtnh7MNGYjrX9+UAjnmaNl/yrzrDZ6l2bkbP49h6ED6SrPa0NkyJF9obTtasIlQCDC88= X-Received: by 2002:a2e:3609:: with SMTP id d9mr52648774lja.188.1578095215849; Fri, 03 Jan 2020 15:46:55 -0800 (PST) MIME-Version: 1.0 References: <3D72D898-A52E-421E-B05E-6119564791F3@dana.is> <96C37E4F-C9BA-4B89-93FF-78D3AC5588EF@dana.is> In-Reply-To: <96C37E4F-C9BA-4B89-93FF-78D3AC5588EF@dana.is> From: Bart Schaefer Date: Fri, 3 Jan 2020 15:46:41 -0800 Message-ID: Subject: Re: Adding to the history from within a widget To: dana Cc: Piers Powlesland , Zsh Users Content-Type: text/plain; charset="UTF-8" On Fri, Jan 3, 2020 at 3:10 PM dana wrote: > > On 3 Jan 2020, at 05:03, Piers Powlesland wrote: > > If I execute another command in the shell I am then able to see the entry > > added with 'print -s' by pressing up twice. > > > > I'm wondering if you experience the same, possibly this has been fixed in > > newer versions of zsh? > > It's the same in master. I'm not positive, but i don't think it's possible to > make new history entries actually selectable until the next prompt. That's essentially correct. Everything that happens from when zle is initialized to when it exits (on accept-line or send-break) is part of the current history event, and up-history moves to the previous event. What's the end result you're trying to achieve by adding to the history from your widget?