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=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 d8afd36b for ; Sat, 4 Jan 2020 00:18:05 +0000 (UTC) Received: (qmail 23835 invoked by alias); 4 Jan 2020 00:17:58 -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: 24597 Received: (qmail 29389 invoked by uid 1010); 4 Jan 2020 00:17:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f49.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.167.49):SA:0(-2.0/5.0):. Processed in 2.704283 secs); 04 Jan 2020 00:17:58 -0000 X-Envelope-From: pierspowlesland@gmail.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.167.49 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=Rs7mAwLqjw80pZnsjpHFRGQCEkmi02gpn644BIQC9+I=; b=un0WhO8750I4SqqPPfOMqdJg2GcX24X0ZvGwF1TdK7sqqflgZVAU7DHh/fqc65AAjG eiW0AO5AVNQ1i3RZti97ExzB3ZIu+TttTvGcx5cXjcrAqHVCSQfGoArCTiMsS38gevH6 0fieAnI6bqw03KcQermd43/A5O2LDCmqs17FYP0ot54/G4ZtFuD2SS2wsr6Qg5M6A8z6 1mXBNnRcJ12nS3go52/bYYRSOgn97V1hxpQrIX6qoVNM6LqfbFQEeYqJ9jTRsUlIBtg9 ez0tff36Fss/2PaK4bGwMryiakyWyJnVEvrwjnwzMP2HhReWg9g6I044wmkt9/2/LFyf yPdQ== X-Gm-Message-State: APjAAAU/P/S/2BotP6V6tgdPKygYYgY9HK3RwrEkFB9ey3eMsfVCZK2N topby/5XbYLbirC5qspL73jeGKbdXCKb7XtVojCPSuOh X-Google-Smtp-Source: APXvYqz45lE0NN8NLjl9S6yceft0m7awpvevnYFKilnE6H3foFJMAX7kZnZgO3XTAV7Wuyv2cr2/hRrY519vPxNH8Fw= X-Received: by 2002:a19:5013:: with SMTP id e19mr51946489lfb.8.1578097041549; Fri, 03 Jan 2020 16:17:21 -0800 (PST) MIME-Version: 1.0 References: <3D72D898-A52E-421E-B05E-6119564791F3@dana.is> <96C37E4F-C9BA-4B89-93FF-78D3AC5588EF@dana.is> In-Reply-To: From: Piers Powlesland Date: Sat, 4 Jan 2020 00:17:09 +0000 Message-ID: Subject: Re: Adding to the history from within a widget To: Bart Schaefer Cc: dana , Zsh Users Content-Type: multipart/alternative; boundary="000000000000952b36059b455936" --000000000000952b36059b455936 Content-Type: text/plain; charset="UTF-8" I've bound ctrl+o to open fzf (a fuzzy finder) which is populated with the output of find and then open the selected file in vim. I'd like to be able to add the vim command to the history, so that pressing up lets me re-open the same file in vim. On Fri, 3 Jan 2020, 23:46 Bart Schaefer, wrote: > 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? > --000000000000952b36059b455936--