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

Re: Btw.: glob-qualifier



On Jan 26, 12:02pm, Sven Wischnowsky wrote:
} Subject: Btw.: glob-qualifier
}
} effect of `(o<oct>)' is to match only files whose modes (all twelve
} bits) exactly match `<oct>'. Shouldn't we either document this or
} first make it a bit more usable and then document it?

Yes.

} E.g. we could
} make it take the next four characters which should be octal digits
} or `.'s, where `.' means that in this three-bit group any value is
} accepted

Oof.  If you're going to make it usable, then REALLY make it usable.
At the risk of further abusing the already over-used parentheses, how
about (o(ug=w,o+r)) for "user and group must have exactly the write
bit set, and other must have at least r" and (o(u+x,go-w)) for "user
must have at least the execute bit set, and group and other must not
have write" and so on.

While I'm on the subject, why do we still have to use *numeric* group
and user IDs for the u and g qualifiers?  Useless for portable scripts,
except possibly for (u0).

(I know, I know, it's slow and unpleasant to do passwd and groups file
lookups, and it's undefined what to do for names that don't exist.
Grumble.)

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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