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 73229816 for ; Fri, 3 Jan 2020 23:09:58 +0000 (UTC) Received: (qmail 11037 invoked by alias); 3 Jan 2020 23:09:49 -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: 24595 Received: (qmail 12740 invoked by uid 1010); 3 Jan 2020 23:09:49 -0000 X-Qmail-Scanner-Diagnostics: from mail-yb1-f180.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.219.180):SA:0(-1.9/5.0):. Processed in 2.436094 secs); 03 Jan 2020 23:09:49 -0000 X-Envelope-From: dana@dana.is 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.219.180 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:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/GPDdB+Idtki13ai58LjtHinzurKFb4KXm+z9L1Of0A=; b=CUUuTSPfRJ2MB1X/drlq2lEExgnLCaRBJ3uHhLu+sln5DZXMhlXltwpzvmaIKsELFQ zRfhCNSxv5NT9EOCqrCZC8AyUxub4E/zzwBGJjFbR015oY5Yez0hLLLGQdYZiIHWu7lM tkcIIB9E4SfZ4mOwu0j9rz79g1fOEs25GkOXw2pkWnFlSTaGOCIk9SQqKCM/x8+/p0GD jM3fYN2vZ373Wv4YqUE4kQoS5e4ByWfF7GqONa7CQ2aDQD2o5oebT/GmrWZYQTIpIf3t /KyhkeaykVwQ+0z578i8uYFRhwlLaRVr6gRynkQ9+9arBXGZ3OMZUU3Oamfu8vbXpKf1 zhBw== X-Gm-Message-State: APjAAAVvtHtYG0iDlnJc1KyI/WaNKhkQi7q8awHCuXqbUR5wAbE4/4m1 GpF7r3YkpyzxWAq9+AVGNR6D/A== X-Google-Smtp-Source: APXvYqxdpWygqOwmqSsiXILYc9TjIEIZbBInQAXD2t5W9vlDiQwiJT+s1f+yALPuIVPNFdB0Mv7uyA== X-Received: by 2002:a5b:e89:: with SMTP id z9mr68462561ybr.133.1578092954086; Fri, 03 Jan 2020 15:09:14 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Subject: Re: Adding to the history from within a widget From: dana In-Reply-To: Date: Fri, 3 Jan 2020 17:11:22 -0600 Cc: zsh-users@zsh.org Content-Transfer-Encoding: 7bit Message-Id: <96C37E4F-C9BA-4B89-93FF-78D3AC5588EF@dana.is> References: <3D72D898-A52E-421E-B05E-6119564791F3@dana.is> To: Piers Powlesland X-Mailer: Apple Mail (2.3445.104.11) 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. You would have to make your widget run `zle .accept-line` or `zle .send-break` (which will cause whatever's currently on the line to be accepted or discarded, respectively) dana