Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Question about the Zsh History event number
- X-seq: zsh-users 14986
- From: Joke de Buhr <joke@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Question about the Zsh History event number
- Date: Thu, 8 Apr 2010 23:29:53 +0200
- In-reply-to: <o2j44ce29c31004080918mb70f74fft9ea88a987e077db1@xxxxxxxxxxxxxx>
- 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: <o2j44ce29c31004080918mb70f74fft9ea88a987e077db1@xxxxxxxxxxxxxx>
If you are using a saved history each time you start a zsh session the old
history gets imported. The numbering continues. You can use old event numbers
in you new session if you like.
There are some options how you can control the history behavior.
http://zsh.sourceforge.net/Doc/Release/Options.html#SEC105
Furthermore zsh has the ability to share it's history across multiple running
sessions. Each command get's it's own event number. You can recall the command
with event number 123 entered in zsh session 1 from zsh session 2 by using the
history command "!123".
On Thursday, 8. April 2010 18:18:54 Vikas Mishra wrote:
> Hello Folks,
>
> I am new to Zsh (have moved to Zsh recently from BASH). I am loving it
> so far. I was playing around with my prompt. I have set the PROMPT
> variable as
>
> export PROMPT="[%m %h] %1d > "
>
> I have one small issue, the history event number is not resetting to 1
> when I start a new shell. Is this expected (at least in BASH this used
> to reset to 1 in a new shell).
>
> Any suggestions ? Thanks for your help.
>
> Regards,
> Vikas
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author