Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Safety guards for typos
- X-seq: zsh-users 27486
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Safety guards for typos
- Date: Sun, 23 Jan 2022 19:17:36 -0500
- Archived-at: <https://zsh.org/users/27486>
- List-id: <zsh-users.zsh.org>
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author