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

Re: Newbie zsh setup warts (history, pipes, export, ...).



On Sun, 24 Oct 2004, s. keeling wrote:

> I also don't appear to have history set up correctly.  It's not
> saving my history between sessions.  These are in my ~/.zshenv:
> 
>   -------------------------------
> HISTCONTROL=ignoredups

This is only used by bash2.  You need "setopt HIST_IGNORE_DUPS" to get the 
zsh equivalent.  But if history ignores dups, then this ...

> setopt HIST_EXPIRE_DUPS_FIRST

... is a no-op, because there won't be any dups to expire.

> export        HISTCONTROL         \
>               HISTFILE            \
>               HISTSIZE
>   -------------------------------
> 
> What am I missing here, and does zsh need those last three exported?

No, they don't need to be exported, the latter two just need to be set. 

(It doesn't do any good to both export them and set them in ~/.zshenv, 
because every zsh will re-read ~/.zshenv and clobber the environment 
value.  You'd only export them if e.g. they were set in ~/.zlogin, which 
is not read by non-login shells.)

Clint answered the "missing" part.



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