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

Re: Feature request: a new warning option



On Wed, 9 Oct 2019 at 20:15, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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



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