zsh-users
 help / color / mirror / code / Atom feed
From: Piers Powlesland <pierspowlesland@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: dana <dana@dana.is>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Adding to the history from within a widget
Date: Sat, 4 Jan 2020 00:17:09 +0000	[thread overview]
Message-ID: <CAFXacXmxdwFdDwFXDnaqLr7pdke=FsB27yUp_GXFDY1kYVyEOA@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7ZcaOx7B5VmedxxrQz0q19i3CJ2uF+4aSAv-6R+L28vTA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

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, <schaefer@brasslantern.com> wrote:

> On Fri, Jan 3, 2020 at 3:10 PM dana <dana@dana.is> wrote:
> >
> > On 3 Jan 2020, at 05:03, Piers Powlesland <pierspowlesland@gmail.com>
> 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?
>

  reply	other threads:[~2020-01-04  0:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02 17:14 Piers Powlesland
2020-01-03  3:37 ` dana
2020-01-03 11:03   ` Piers Powlesland
2020-01-03 23:11     ` dana
2020-01-03 23:46       ` Bart Schaefer
2020-01-04  0:17         ` Piers Powlesland [this message]
2020-01-04  1:41           ` Bart Schaefer
2020-01-06 13:40             ` Piers Powlesland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFXacXmxdwFdDwFXDnaqLr7pdke=FsB27yUp_GXFDY1kYVyEOA@mail.gmail.com' \
    --to=pierspowlesland@gmail.com \
    --cc=dana@dana.is \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).