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

Re: Globbing feature suggestion



[zsh-workers copied]

On Dec 13,  9:13pm, Jonathan Hankins wrote:
}
} >  -nogroup is the glob qualifier
} >  (e['stat -s -A reply +gid $REPLY;
} > reply=(${${(M)reply:#<->}/<->/$REPLY})'])
} 
} This doesn't work for me -- stat -s returns '???' when there is no
} pw/grent for the the u/gid.

Urk.  Sorry about that; I don't actually *have* any files with unknown
uid/gid on my system, but I had assumed "stat" would return the numeric
ID in the absence of a name, the way "ls -l" does.

In fact I think it's pretty darn useless to return '???' for all unknown
IDs, as if they were equivalent.  Would anyone seriously object if that
were changed?

} It works if I change it to:
} 
}   -nogroup is the glob qualifier
}   (e['stat -s -A reply +gid $REPLY;
}   reply=(${${(M)reply:#???}/???/$REPLY})'])

As that's written, ??? is a pattern matching any three characters, so if
you have any 3-letter usernames on your system, that would improperly
include them.  You need \?\?\? instead.



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