Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to save history between session
- X-seq: zsh-users 15960
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: zsh <zsh-users@xxxxxxx>
- Subject: Re: How to save history between session
- Date: Wed, 13 Apr 2011 11:45:52 +0100
- In-reply-to: <BANLkTi=6Rf_ozNSuQq_jpZXgKZepEYEWBw@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
- Organization: Cambridge Silicon Radio
- References: <BANLkTi=6Rf_ozNSuQq_jpZXgKZepEYEWBw@mail.gmail.com>
On Wed, 13 Apr 2011 17:58:38 +0800
first name <33facebook@xxxxxxxxx> 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@xxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author