Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: .zsh_history
On Sat, Apr 8, 2023 at 12:23 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
>
> On 2023-04-08 09:53, Roman Perepelitsa wrote:
> >
> > Yes. If you exit all shells, you'll have history from all of them
> > saved within $HISTFILE.
> >
> >
> I can't remember if it's stock or something I cobbled together for
> myself, but my history is updated in real time, I don't need to exit.
> All shells have all commands available from all other shells in real
> time. Only thing is that I have to press ENTER to update each shell to
> the current state. Tho my history selection function doesn't even need
> that, it's up to the second all the time.
You have SHARE_HISTORY on. It's not on by default.
Why not give a try to some minimal defauts?
mkdir -p /tmp/zsh
touch /tmp/zsh/.zshrc
ZDOTDIR=/tmp/zsh HISTFILE=/tmp/zsh/.history SAVEHIST=30 zsh
It seems nobody knows what vanilla zsh actually does.
> Mind, I've sometimes wanted to be able to isolate a shell from history
> and I expect that's easy, tho I don't know how.
Quite easy:
fc -p
It creates a new history stack (no $HISTFILE). To return to the previous one:
fc -P
Cheers.
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author