Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [RFC PATCH 3/3] FAQ: sync newuser-install



On 2022-08-25 23:22:13 -0500, Felipe Contreras wrote:
> This:
> 
>   sect(Why is my history not being saved?)
>   label(321)
> 
>     In zsh you need to specifically enable history:
>     verb(
>       setopt SAVE_HISTORY
>     )
> 
> Is simpler than this:
> 
>   sect(Why is my history not being saved?)
>   label(321)
> 
>     In zsh, you need to set three variables to make sure your history is
>     written out when the shell exits.  For example,
>     verb(
>       HISTSIZE=200
>       HISTFILE=~/.zsh_history
>       SAVEHIST=200
>     )
>     tt($HISTSIZE) tells the shell how many lines to keep internally,
>     tt($HISTFILE) tells it where to write the history, and tt($SAVEHIST),
>     the easiest one to forget, tells it how many to write out.  The
>     simplest possibility is to set it to the same as tt($HISTSIZE) as
>     above.  There are also various options affecting history; see the
>     manual.

The ability to choose the history filename and size is more important
than just having a single option for simplicity.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




Messages sorted by: Reverse Date, Date, Thread, Author