From: Sam Giraffe <sam@giraffetech.biz>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: Trouble with history
Date: Sat, 31 Jan 2015 22:58:49 -0800 [thread overview]
Message-ID: <CAC97zZ8iKZumHV_Dyt0ZMT0ZaatGCOLaF+X+UgWEcdtNXUD4Fw@mail.gmail.com> (raw)
In-Reply-To: <150131103306.ZM18864@torch.brasslantern.com>
Thank you, setting HISTSIZE to match SAVEHIST solved my problem. :)
On Sat, Jan 31, 2015 at 10:33 AM, Bart Schaefer
<schaefer@brasslantern.com> 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.
prev parent reply other threads:[~2015-02-01 6:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 15:06 Sam Giraffe
2015-01-31 18:33 ` Bart Schaefer
2015-02-01 6:58 ` Sam Giraffe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAC97zZ8iKZumHV_Dyt0ZMT0ZaatGCOLaF+X+UgWEcdtNXUD4Fw@mail.gmail.com \
--to=sam@giraffetech.biz \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).