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

Re: [PATCH] Introduce ZCALC_HISTFILE



Hi Julian,

Thanks for the submission!  I don't have a particular opinion on
this proposal, but...

On Fri, Sep 9, 2022, at 7:27 PM, Julian Prein wrote:
> +the file tt($ZCALC_HISTFILE).  If tt($ZCALC_HISTFILE) is unset,
> +tt($ZDOTDIR/.zcalc_history) is used instead.

This doesn't align with the actual code.

>  # We use our own history file with an automatic pop on exit.
> -history -ap "${ZDOTDIR:-$HOME}/.zcalc_history"
> +history -ap "${ZCALC_HISTFILE:-${ZDOTDIR:-$HOME}/.zcalc_history}"

Consider something along the lines of:

	Full command line editing, including the history of previous
	calculations, is available; the history is saved in the
	file specified by $ZCALC_HISTFILE, $ZDOTDIR/.zcalc_history
	(if $ZCALC_HISTFILE is unset or empty), or $HOME/.zcalc_history
	(if both $ZCALC_HISTFILE and $ZDOTDIR are unset or empty).

-- 
vq




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