zsh-users
 help / color / mirror / code / Atom feed
* How to save history between session
@ 2011-04-13  9:58 first name
  2011-04-13 10:45 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: first name @ 2011-04-13  9:58 UTC (permalink / raw)
  To: zsh

the shell doesn't remember history between different terminals..not to
mention after a logout and login.
how to fix it?
thanks


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

* Re: How to save history between session
  2011-04-13  9:58 How to save history between session first name
@ 2011-04-13 10:45 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2011-04-13 10:45 UTC (permalink / raw)
  To: zsh

On Wed, 13 Apr 2011 17:58:38 +0800
first name <33facebook@gmail.com> wrote:
> the shell doesn't remember history between different terminals..not to
> mention after a logout and login.
> how to fix it?
> thanks

To fix the second problem, in ~/.zshsrc set HISTFILE to a file where you
want to save the history and SAVEHIST to the number of lines to save.
If you make this large, set HISTSIZE to the same value (not needed but
usually the right thing to do).  In my ~/.zshsrc I have

HISTSIZE=1000
if (( ! EUID )); then
  HISTFILE=~/.history_root
else
  HISTFILE=~/.history
fi
SAVEHIST=1000

To fix the first problem, it sounds like you probably want to add
"setopt SHARE_HISTORY" to your ~/.zshrc but there are other
possibilities described in the "History" section of the zshoptions
manual page.

-- 
Peter Stephenson <pws@csr.com>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom


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

end of thread, other threads:[~2011-04-13 11:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13  9:58 How to save history between session first name
2011-04-13 10:45 ` Peter Stephenson

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