zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: Re: zsh: corrupt history file
Date: Wed, 29 Jul 2020 23:56:12 -0400	[thread overview]
Message-ID: <1e250159-b06f-ad39-0cef-e27c5fefa89a@gmx.com> (raw)
In-Reply-To: <20200729230756.48e8c61d@tarpaulin.shahaf.local2>

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.

  reply	other threads:[~2020-07-30  3:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29 14:32 Perette Barella
2020-07-29 14:39 ` Roman Perepelitsa
2020-07-29 15:15   ` Perette Barella
2020-07-29 15:21     ` Eric Cook
2020-07-29 23:07       ` Daniel Shahaf
2020-07-30  3:56         ` Eric Cook [this message]
2020-07-30  4:30           ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e250159-b06f-ad39-0cef-e27c5fefa89a@gmx.com \
    --to=llua@gmx.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).