zsh-users
 help / color / mirror / code / Atom feed
* Safety guards for typos
@ 2022-01-24  0:17 Phil Pennock
  2022-01-24  1:46 ` Mikael Magnusson
  2022-01-24  5:57 ` Daniel Shahaf
  0 siblings, 2 replies; 6+ messages in thread
From: Phil Pennock @ 2022-01-24  0:17 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-24  5:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-24  0:17 Safety guards for typos Phil Pennock
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

Code repositories for project(s) associated with this 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).