zsh-users
 help / color / mirror / code / Atom feed
* Question about the Zsh History event number
@ 2010-04-08 16:18 Vikas Mishra
  2010-04-08 21:29 ` Joke de Buhr
  0 siblings, 1 reply; 2+ messages in thread
From: Vikas Mishra @ 2010-04-08 16:18 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Question about the Zsh History event number
  2010-04-08 16:18 Question about the Zsh History event number Vikas Mishra
@ 2010-04-08 21:29 ` Joke de Buhr
  0 siblings, 0 replies; 2+ messages in thread
From: Joke de Buhr @ 2010-04-08 21:29 UTC (permalink / raw)
  To: zsh-users

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
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-08 21:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08 16:18 Question about the Zsh History event number Vikas Mishra
2010-04-08 21:29 ` Joke de Buhr

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).