Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh: corrupt history file
On 7/29/20 7:07 PM, Daniel Shahaf wrote:
I guess you mean adding such warnings to zshparam(1)? In which case,
perhaps adding them to bin_typeset() would be more effective? As in:
% export HISTORY=foo
zsh:1: warning: $HISTORY should not be exported; use 'typeset HISTORY=foo' instead
(and if someone actually needs to export $HISTORY for whatever reason,
we can make -h suppress the warning)
That is indeed what i meant, but your solution has two problems in the example of PS1.
if it is in the environment when zsh starts and the user doesn't set it, you experience
the issue of another shell's escape sequences being used that typeset won't warn of since
it isn't being used. the second issue being software like python's virtualenv being written
under the assumption that exporting PS1 won't cause an warning message in the shells their
activation script is written for, would need to now account for that.
I know i have offered critiques yet no solutions, but i don't think either of the suggestions
is ideal personally.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author