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

Re: [PATCH] Index of element after width of characters

On 28 October 2015 at 08:46, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> I've counted actual flags, there are 42 of them, so there seems to be
> room for 10 of them (2*26 letters of English alphabet), 8 with my two
> patches. That might be not much. Plus symbols it's more, maybe this
> helps. I could use "-" and "," for the patches, it's quite mnemonic –
> it would look like ${(-:10:)a}, ${(,:9:)a} - the number is a limit,
> "-" is before limit, "," is after limit. Thought about "," and ".",
> but "." feels more like "at limit", while "," as "after limit". Minus
> feels like "before limit" so "-", "," it's quite fine, even better
> than "x", "y".

Could also code '.' as "at limit". It would be empty when the limit
doesn't divide any char into half, and return the char (as index) in
other case. This would be a full support of any string operations
where width counts. I'm heating up the already hard to grasp intuition
of the flags, hoping for better end effect.

Best regards,
Sebastian Gniazdowski

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