From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: zsh-users@zsh.org
Subject: Safety guards for typos
Date: Sun, 23 Jan 2022 19:17:36 -0500 [thread overview]
Message-ID: <Ye3wIGuWrDpsIT2I@fullerene.field.pennock-tech.net> (raw)
So I just had a rather bad time when I didn't type a dot.
Instead of:
mv *(.) old-2022-01-23/
I typed:
mv *() old-2021-01-24/
This created a function `mv` and a function for each entry in the
current directory. I should not have had a directory named `cd`, that
was a bad call. My Downloads area is full of cruft.
Is there anything that I can turn on, in parsing, so that *() is
interpreted as a syntax error instead of doing the globbing first and
then defining many functions?
-Phil
next reply other threads:[~2022-01-24 0:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-24 0:17 Phil Pennock [this message]
2022-01-24 1:46 ` Mikael Magnusson
2022-01-24 2:01 ` Phil Pennock
2022-01-24 2:11 ` Phil Pennock
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=Ye3wIGuWrDpsIT2I@fullerene.field.pennock-tech.net \
--to=zsh-workers+phil.pennock@spodhuis.org \
--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).