From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8875 invoked by alias); 13 Apr 2011 11:12:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15960 Received: (qmail 21466 invoked from network); 13 Apr 2011 11:12:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Wed, 13 Apr 2011 11:45:52 +0100 From: Peter Stephenson To: zsh Subject: Re: How to save history between session Message-ID: <20110413114552.1d48eb01@pwslap01u.europe.root.pri> In-Reply-To: References: Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.103.11.49] X-Scanned-By: MailControl A_10_80_00 (www.mailcontrol.com) on 10.71.0.137 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 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