From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh-users@zsh.org
Subject: Re: Safety guards for typos
Date: Sun, 23 Jan 2022 21:11:38 -0500 [thread overview]
Message-ID: <Ye4K2uGS4tY9kI+R@fullerene.field.pennock-tech.net> (raw)
In-Reply-To: <CAHYJk3TSjchUiCPCAto+7gHeXo0GUnwQA-zy6ho9EM2bybgNbA@mail.gmail.com>
On 2022-01-24 at 02:46 +0100, Mikael Magnusson wrote:
> setopt NO_MULTI_FUNC_DEF would probably do the trick in this case,
> though it will also prevent explicitly saying mv cp ln() { whatever }.
I tried it and the protection doesn't appear to fire. Is it possible
that the examination of multiple words before the function definition
happens prior to globbing expansion?
% echo $ZSH_VERSION
5.8
% echo ${options[multifuncdef]}
off
% *() { echo wibble }
% whence -vfa zshenv zshrc
zshenv () {
echo wibble
}
zshrc () {
echo wibble
}
%
-Phil
next prev parent reply other threads:[~2022-01-24 2:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 0:17 Phil Pennock
2022-01-24 1:46 ` Mikael Magnusson
2022-01-24 2:01 ` Phil Pennock
2022-01-24 2:11 ` Phil Pennock [this message]
2022-01-24 2:51 ` Bart Schaefer
2022-01-24 5:57 ` 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=Ye4K2uGS4tY9kI+R@fullerene.field.pennock-tech.net \
--to=zsh-workers+phil.pennock@spodhuis.org \
--cc=mikachu@gmail.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).