Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: shared history but recalling history in current terminal
- X-seq: zsh-users 18165
- From: Wayne Davison <wayne@xxxxxxxxxxxxxxx>
- To: shawn wilson <ag4ve.us@xxxxxxxxx>
- Subject: Re: shared history but recalling history in current terminal
- Date: Tue, 26 Nov 2013 22:31:13 -0800
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=thedavisons.net; h= mime-version:in-reply-to:references:from:date:message-id:subject :to:cc:content-type; s=thedavisons.net; bh=Eq+BewPg35BIhR4I6bkCm rXRsb4=; b=SyI4pUf/9iRv70RwqKahs00/I08CX3VvYc0gonXGz7140AlX3MKLp sQ3lmJzTGnbdEchVg4AV4tHO57CfZ6K0PLqOv6YuqVqqP9d8zv96j4mlkiBMDodb +L74EAXd9EsNItJvBXOodBmrrAnJ1+M/qussfF5JhvV28uu5307rXk=
- In-reply-to: <CAH_OBidWaRPQvKE1aCjr9Qbs8J2-ZiwV-k2JQXu49DYwDCAVSA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAH_OBidWaRPQvKE1aCjr9Qbs8J2-ZiwV-k2JQXu49DYwDCAVSA@mail.gmail.com>
On Tue, Nov 26, 2013 at 12:30 PM, shawn wilson <ag4ve.us@xxxxxxxxx> wrote:
> what I'd like is to be able to search a shared history but have my up
> arrow use just the history in my current terminal. Is that possible?
>
Yes, that's possible. I do something similar, where I have Ctrl-P/Ctrl-N
only go through local history (I leave up/down arrow going through the
shared history).
bindkey '^p' up-line-or-local-history
bindkey '^n' down-line-or-local-history
up-line-or-local-history() {
zle set-local-history 1
zle up-line-or-history
zle set-local-history 0
}
zle -N up-line-or-local-history
down-line-or-local-history() {
zle set-local-history 1
zle down-line-or-history
zle set-local-history 0
}
zle -N down-line-or-local-history
If you change that to bindkey the arrows, you'll get what you want.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author