Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Globbing feature suggestion
- X-seq: zsh-workers 22081
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Jonathan Hankins <jonathan-hankins@xxxxxxxxxxxxxx>
- Subject: Re: Globbing feature suggestion
- Date: Thu, 15 Dec 2005 04:34:52 +0000
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <871x0ge5ge.fsf@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <87irtt4uno.fsf@xxxxxxxxxxxxxxx> <1051213041649.ZM21953@xxxxxxxxxxxxxxxxxxxxxxx> <871x0ge5ge.fsf@xxxxxxxxxxxxxxx>
[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