Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Index of element after width of characters
- X-seq: zsh-workers 36988
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Index of element after width of characters
- Date: Tue, 27 Oct 2015 20:55:41 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=izs9muVtzJFXWl9LahB6sosleJqufEoNdvvfE4UO/tw=; b=RWS2Dkc3X821nb1tCt6wV/eN6wUp1gDxMH59Q6SD3Nx0cJXEKtXywdLYKNyWV8RhQg CGVy1ljNuNcbj+U0fWioYKJcQE/DciA6b8gOaiIVpS7yKSIMzBHKzSxiCdXPhPfXEynm evyCPr5UdJN8lU2PcpFqrg7akC6ofOQIy/VNYPANodslS4dZaUsauyPdPoBM+s8Tf82T EtO4lX4JFkBl4TUDfIY/Gr4DagaZJthu4aV6Z2KoeEgN6+l1LS8clwUUXjfqblZ0I9um p3VsBk3GWM7f+buAfXA0nLInnpR6PqtMA1Q8ypv+MqPCmCaHwKlWEu+mXs3UL14tnZi4 5DtQ==
- In-reply-to: <CAKc7PVC4LFGnBJau3gWuws3bTgc+zcnEE+o-B8ZmKEEWa8Kpog@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVC4LFGnBJau3gWuws3bTgc+zcnEE+o-B8ZmKEEWa8Kpog@mail.gmail.com>
On 27 October 2015 at 18:18, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> I then noticed useful (m) flag that returns widths. Scrolling can be
> done this way but basically it requires to output characters one by
> one.
To be exact. Suppose you want to display $COLUMNS wide characters, and
skip N characters from beginning of the string. This can be done with
(m) flag by iterating over every char and detecting when to start
displaying, and when to stop displaying. With (x) and (y) flags this
will be much simpler.
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author