Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Safety guards for typos



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