From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29999 invoked by alias); 1 Feb 2015 06:59:09 -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: 19789 Received: (qmail 21502 invoked from network); 1 Feb 2015 06:58:53 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=UllDkoWbMrkK5ll6HBOQggUWhr189lwXphlqwp2GkpU=; b=QxSLVP5B2C6ykBtVNb1VukjqBqdoPxUK7bgkt3th7KYRyAqn1iwbUsEou4o7ldVkpF r9jyWI2cKZ2ja0u+t+EHBfGntv5KxFPaQpweyA/vQVfQIYkg8qxlU0pe1Evw+uCxPj6L n5YBDJ/E0pZeGJb2gfuKJRzdruoxkxA5hX7T2igrT6G5UUgYvUfD8Pt4S7vth8yx+V+7 95xl2SgxxSKYE0DNp+h+1yS/MEKw7neZPLSm6O0imaWUoOLQOpNb0C5xGjqB9sx/1Mtn eR1as2GBbEX+dshj0MuN9UPWncl0iP5mUSo0nwoMfP4OCW3h5KmGWwtmEZVWxWdsGQZD QB1Q== X-Gm-Message-State: ALoCoQlYAtR6qLr0H2E9mMjQsKBPlRihsL+7OX/EYoNFlqBLs5hVafWXrasrUDX5InNPWJNS1ckr MIME-Version: 1.0 X-Received: by 10.107.164.142 with SMTP id d14mr16472632ioj.13.1422773929551; Sat, 31 Jan 2015 22:58:49 -0800 (PST) X-Originating-IP: [144.189.31.2] In-Reply-To: <150131103306.ZM18864@torch.brasslantern.com> References: <150131103306.ZM18864@torch.brasslantern.com> Date: Sat, 31 Jan 2015 22:58:49 -0800 Message-ID: Subject: Re: Trouble with history From: Sam Giraffe To: Bart Schaefer Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 Thank you, setting HISTSIZE to match SAVEHIST solved my problem. :) On Sat, Jan 31, 2015 at 10:33 AM, Bart Schaefer wrote: > 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.