Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _describe and literal \n
- X-seq: zsh-workers 38930
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] _describe and literal \n
- Date: Sun, 24 Jul 2016 01:27:08 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1469316429; bh=g63ND32hTe8O90DPJkABnBu5zTwbsFBciWppv1fe3Zk=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=rQxFSNU0IJOhO7CJFRZhZZElaJ+q3Iac/hcWpEXbs4P+J2z9SRg5DDrjRS7LJv3RdOyR28D8w5JE1MlJ1yUoHntM0v/gZqDPh0oqW4KCuhyA0+bcKidinSq7+qDPUi0UM8sZqLvyqESLFE4HMlV+D9ygh6fvvsUE37s+k82jn+KRr0GiFg/h3uxiO3yuoIMfUF52iUF1AoORjpmIBZSeISPZD8LiYPq5j9RE9MPNew6j1GhEzUQCjhikhBWMDWJdQcSWTCEYOwSGs0HNba5wCKyktKAFfp2iB2rnQ/iuYXavbfpErb9amnZ8mbnPg4vnhYeZNKLfjrzLF/j/A1UguQ==
- In-reply-to: <20160723212345.GA2982@tarsus.local2>
- 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: <20160723180430.GA22451@tarsus.local2> <160723130059.ZM19333@torch.brasslantern.com> <20160723212345.GA2982@tarsus.local2>
Daniel Shahaf wrote:
> I haven't been able to get menu selection's highlighting to misbehave.
>
> However, consider this:
>
> Current master:
> % _f() { a=( $'foo:hello\nworld' $'bar:lorem\nipsum' $'baz:lorem\nipsum' ); _describe descr a }
> % f <TAB>
> baz
> foo -- lorem\nipsum
> bar -- hello\nworld
Is your fix to the internals of _describe or the more general code.
Note that _describe truncates descriptions but by using compadd -ld, you
can have multiline descriptions and it works well. fc completion often
contains newlines and I've never had issues with it. However, I think
the intention in _describe was to not have newlines.
I'm not especially fond of the \n escapes. Would prefer they were mapped
to spaces. However, failing to group baz and foo is clearly wrong.
It could be worth experimenting with long strings that approach the
right edge of the terminal to see if it is affecting the calculations.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author