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

Reasons for not wanting EXTENDED_GLOB interactively (was Re: PATCH:...)

Zefram <zefram@xxxxxxxx> writes:

> I find it difficult to believe that anything actually relies on
> "emulate zsh" *not* resetting EXTENDED_GLOB.

This isn't really on the same subject, but a colleague wanted to
delete files beginning .# in a directory a few days ago (they're
created by Emacs ediffing files with versions or something), and did:

        rm .#*

(Don't try this at home.)

I'm not sure whether this is a bug in zsh.  After all, the "rm *"
warning is a special case (and useful, too, IMHO).

Hmm, how about changing the implementation of the check?  Presumably
the current test looks for * explicitly; an alternative (slightly more
expensive) would be to do the expansion and see if it includes all of
the files or not, and if it does, issue the warning.  

In fact, one could probably do this as a shell function, instead.
That probably makes more sense.

Messages sorted by: Reverse Date, Date, Thread, Author