zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: lilydjwg <lilydjwg@gmail.com>
Cc: Mikael Magnusson <mikachu@gmail.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: bad math expression error inside _pick_variant when running insert-all-matches for ls
Date: Mon, 28 Sep 2020 13:42:03 -0700	[thread overview]
Message-ID: <CAH+w=7av7nyeWLOWktYVPgFw1nS52JYQnMnaNz=o0s7e83URog@mail.gmail.com> (raw)
In-Reply-To: <CABaaJjOTkGktqEfHy9Bvv7dRxpP6v-FMJQamvb1P3QPoZ0XuYQ@mail.gmail.com>

On Mon, Sep 28, 2020 at 10:52 AM lilydjwg <lilydjwg@gmail.com> wrote:
>
> I'm sorry I thought it came with zsh, but it turned out that I got it from a zsh-users message.

Wow.  That's from Andrej B. back in 1999/2000.  In fact I can't even
find the message that actually defines the function, just a couple of
the ones that discuss what it might do.

> This code has worked for me for a few years until today I noticed that it didn't work well with ls.

I can reproduce from zsh -f plus your function.  According to _main_complete:

# _precommand sets this to indicate we are following a precommand modifier
local -a precommands

I think the issue is that _insert_all_matches is expecting to be
called as a completer from inside _main_complete, not as a standalone
widget.

If we want _pick_variant to work in this context, we need PWS's patch,
but there may be other oddities as well.  Perhaps 20 years ago it was
OK to call _complete directly like that, but it's not OK any longer.


  reply	other threads:[~2020-09-28 20:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 15:39 lilydjwg
2020-09-28 16:30 ` Mikael Magnusson
2020-09-28 16:47   ` Peter Stephenson
2020-09-28 16:51     ` Peter Stephenson
2020-09-28 17:02       ` Roman Perepelitsa
2020-09-28 17:06         ` Peter Stephenson
2020-09-28 17:51   ` lilydjwg
2020-09-28 20:42     ` Bart Schaefer [this message]
2020-09-29  6:10       ` Oliver Kiddle
2020-09-29 14:59         ` lilydjwg
2020-10-04 17:11           ` 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='CAH+w=7av7nyeWLOWktYVPgFw1nS52JYQnMnaNz=o0s7e83URog@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=lilydjwg@gmail.com \
    --cc=mikachu@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).