Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Feature request: a new warning option
- X-seq: zsh-users 24341
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Feature request: a new warning option
- Date: Thu, 10 Oct 2019 05:29:41 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=kzjD9DzrdAmTYaMxazapq6VBncFrry5RvZ2dcqHfRZg=; b=Kh8+E4xQznace6a+MKnX/M4hwTv53vvgTDD4RLzb8yyk5EVGYIiXMoqfBiAFni8DFF H9sQoxqZn54OxAQr72RKNAjqlX0p+a4PEvaGV6TvoIB5rmBZW156S3JsY3shcy4N35bx x98DhXpy0WeCJFSNgw6quyKXeoSRjjXuEBodoillCWn2GC4YbGNFijFhD6MlduOzQmvf P1vkgnbUwOnRfxKQCTeKYgN3jgoHSlCqlcgMAJ4h2bg6s5SfWXRGIEKBstLCLVOP6NeZ BJJbEbrJBUJpP/J2lxYWpg59a45nEqtrO5LR6xRuikN1N8bc9Z7o6+KE0CtlsRcaEN45 kH7Q==
- In-reply-to: <CAH+w=7bADq2FOjfrqBLN1tg_kbsDmQNt24riVHnZan24QCTyDg@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDN-GspoiS-iVR5ThdbDVbLWVNJWcZ=TyY0=9ydtPswAw@mail.gmail.com> <CAH+w=7bADq2FOjfrqBLN1tg_kbsDmQNt24riVHnZan24QCTyDg@mail.gmail.com>
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