zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Marlon Richert <marlon.richert@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Improve extra-verbose completion of array params
Date: Mon, 17 May 2021 00:09:14 +0200	[thread overview]
Message-ID: <45628-1621202954.654188@2yrG.1rQ3.yd3_> (raw)
In-Reply-To: <CAHLkEDsLhV6ZWoo3G-ULG0o6TvBtnE8n7c+sjeYuNz3yZ7bRoQ@mail.gmail.com>

On 27 Apr, Marlon Richert wrote:
> This patch improves the extra-verbose completion display strings for
> arrays and associative arrays.
> -    verbose=(
> -        ${described[@]:/(#m)*/"${MATCH}:${(@q+)${(Pkv@q+)MATCH}//\\/\\\\}"} )
> +    verbose=( ${${${(f@)"$( typeset -m $described )"}/=/:}[@]//'\'/'\\'} )

Why the use of -m here? Is that to avoid it creating variables (which
may not matter especially in the subshell). Do we need to be concerned
about the possibility of glob characters appearing there and producing
more output than expected?

Apart from my puzzlement over that the patch essentially looks fine.
I did notice some issues with _describe being messed up with compadd
options in later use of the new feature (without this extra patch) which
I intended to come back and take a look at.

>  (( compstate[nmatches] > nm ))
> -return 0

That's certainly correct and I ought to have caught it before committing.

Oliver


  parent reply	other threads:[~2021-05-16 22:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 10:28 Marlon Richert
2021-05-09 17:47 ` Lawrence Velázquez
2021-05-16 16:12   ` Lawrence Velázquez
2021-05-16 16:18     ` Mikael Magnusson
2021-05-16 19:40       ` Marlon Richert
2021-05-16 22:09 ` Oliver Kiddle [this message]
2021-05-17 11:58   ` Marlon Richert

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=45628-1621202954.654188@2yrG.1rQ3.yd3_ \
    --to=opk@zsh.org \
    --cc=marlon.richert@gmail.com \
    --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).