Ticket #17 (closed new feature: implemented)
new *attr() functions
| Reported by: | cary | Owned by: | Ashen-Shugar |
|---|---|---|---|
| Priority: | low | Milestone: | 3.9.1 alpha 2 |
| Component: | rhostmush | Version: | 3.9.1 alpha |
| Severity: | none | Keywords: | attributes input limit |
| Cc: |
Description (last modified by Ashen-Shugar) (diff)
I find that I frequently want to know the max (typically lexically) attribute which matches a pattern on an object or cluster.
As long as the list is not too long, one can accomplish this with last(sort(lattr(...))), but if the list is too long, thus exceeding thing limit of what can be parsed, this does not give the expected result.
The only other option is to use the page number arg to lattr but as attributes are not sorted there is no way of knowing on which page the max will be be, so all must be checked, which is a pain.
Obviously with all but arbitrary numbers of attributes possible on a cluster this is even more problematic.
So! It would be VERY handy to have a function like lattr(), call it maxattr() which would return the 'last' attribute a la last(sort(lattr(...))) (so it needs to accept a pattern as well, not just an object).
