zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] _describe and literal \n
Date: Sun, 24 Jul 2016 01:27:08 +0200	[thread overview]
Message-ID: <5530.1469316428@hydra.kiddle.eu> (raw)
In-Reply-To: <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


  reply	other threads:[~2016-07-23 23:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-23 18:04 Daniel Shahaf
2016-07-23 20:00 ` Bart Schaefer
2016-07-23 21:23   ` Daniel Shahaf
2016-07-23 23:27     ` Oliver Kiddle [this message]
2016-07-24  1:27       ` Bart Schaefer
2016-07-24 21:30       ` Daniel Shahaf
2016-09-27 20:32         ` Oliver Kiddle
2016-09-29 14:11           ` Daniel Shahaf
2016-09-29 14:28             ` Daniel Shahaf
2016-10-07 13:50             ` Daniel Shahaf
2016-10-07 14:53               ` Bart Schaefer
2016-10-08  7:42                 ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5530.1469316428@hydra.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).