From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12834 invoked by alias); 31 Jan 2015 18:33: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: 19788 Received: (qmail 17552 invoked from network); 31 Jan 2015 18:33:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=B94OC1pJ c=1 sm=1 tr=0 a=FT8er97JFeGWzr5TCOCO5w==:117 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=oR5dmqMzAAAA:8 a=-9mUelKeXuEA:10 a=YNv0rlydsVwA:10 a=YzGHbCGN3Mcd1awX3PsA:9 a=KlQ3wjrFNa0OFxpC:21 a=GDVOxvwiARgr202R:21 a=CjuIK1q_8ugA:10 From: Bart Schaefer Message-id: <150131103306.ZM18864@torch.brasslantern.com> Date: Sat, 31 Jan 2015 10:33:06 -0800 In-reply-to: Comments: In reply to Sam Giraffe "Trouble with history" (Jan 31, 7:06am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Trouble with history MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 31, 7:06am, Sam Giraffe wrote: } } I am having trouble getting zsh backward history search to work from } the zsh history file. Let's start by getting the history number into your prompt: PROMPT='%h %~> ' If that number is greater than 1 when the shell starts up, then your history is being read. } My .zsh_history file is only 2,850 bytes, with 104 commands in it. The next thing to note is that the default value for $HISTSIZE (the number of commands the shell will keep in memory) is only 30, and you have not reset it in the .zshrc that you sent, so only the most recent 30 commands from $HISTFILE would be kept; you won't be able to search farther back than that. The use of share_history can allow the HISTFILE to grow larger than HISTSIZE. Otherwise you'd normally want HISTSIZE to be at least as large as SAVEHIST. } When I type in Ctrl-R, the backward history search works only for the } history items that were typed during the life of the shell. There is a control for accessing only the current shell's history when using share_history but it looks pretty unlikely that you've got that turned on. First let's confirm that your history is even being read.