zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Feature request: a new warning option
Date: Thu, 10 Oct 2019 05:29:41 +0200	[thread overview]
Message-ID: <CAKc7PVCrwB8wN+5LjJGiH7C_t1Xa3CnOhF3sZqiKpawvP=ibLw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bADq2FOjfrqBLN1tg_kbsDmQNt24riVHnZan24QCTyDg@mail.gmail.com>

On Wed, 9 Oct 2019 at 20:15, Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> This seems like something better suited for a shell script "lint" type
> program

True, it's well suited for such program, but maybe it isn't that bad
also for the shell?

> rather than something to emit as a run-time warning from the
> shell itself.  There's also the question of when this warning would be
> emitted; if at execute time, is it really doing anything useful?

I think yes: it would work similar to warn_create_global – when
working on a script it would emit such warnings and inform the
programmer of the problem. The programmer would then react and change
the code, preventing it to be released to the public, like in the case
of creating a global.

> If you want a runtime
> warning, maybe do something with ${(z)ZSH_DEBUG_CMD} in a TRAPDEBUG
> function?

Thanks, that's an interesting idea.
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

      reply	other threads:[~2019-10-10  3:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09  4:02 Sebastian Gniazdowski
2019-10-09  8:45 ` Roman Perepelitsa
2019-10-09  8:49   ` Peter Stephenson
2019-10-09 11:56   ` Sebastian Gniazdowski
2019-10-09 12:08     ` Roman Perepelitsa
2019-10-09 13:17       ` Sebastian Gniazdowski
2019-10-09 13:24         ` Peter Stephenson
2019-10-09 13:41           ` Sebastian Gniazdowski
2019-10-09 14:07             ` Ray Andrews
2019-10-09 15:19               ` Peter Stephenson
     [not found]           ` <CAKc7PVBQnt_ZE3X=8gz5R_VURwaTL3mDL=X-7H__yYqAjvXoWA__41912.055101578$1570628583$gmane$org@mail.gmail.com>
2019-10-09 14:04             ` Stephane Chazelas
2019-10-09 13:40         ` Roman Perepelitsa
2019-10-09 17:36           ` Daniel Shahaf
2019-10-09 18:15 ` Bart Schaefer
2019-10-10  3:29   ` Sebastian Gniazdowski [this message]

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='CAKc7PVCrwB8wN+5LjJGiH7C_t1Xa3CnOhF3sZqiKpawvP=ibLw@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@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).