From: Bart Schaefer <schaefer@brasslantern.com>
To: Tomasz Pala <gotar@polanet.pl>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: _complete: insert unambiguous when globbing
Date: Wed, 5 Jan 2022 12:25:26 -0800 [thread overview]
Message-ID: <CAH+w=7ZZhb0XVqt+ONLnk9bdH8HvFS5UbKFMt9-nf1n0L0pfFg@mail.gmail.com> (raw)
In-Reply-To: <20220105201522.GA6768@polanet.pl>
On Wed, Jan 5, 2022 at 12:15 PM Tomasz Pala <gotar@polanet.pl> wrote:
>
> OK, this was pretty straightforward:
>
> if [[ $PREFIX = *'*'* ]]; then
> compstate[pattern_insert]=not_menu
> _eat_asterisk=true
> elif [ "$_eat_asterisk" = 'true' ]; then
> compstate[old_list]=keep
> fi
If the solution with the _match completer doesn't work for you, my
suggestion for the above would be to use
if [[ $PREFIX = *[*?\[\]]* ]]; then
to cover more glob operators than just "*".
> Having said that - does this behaviour deserve upstreaming with it's own
> zstyle, or is it too hacky?
I'd say you need to demonstrate how this differs from the
insert-unambiguous style before we can make a determination.
prev parent reply other threads:[~2022-01-05 20:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 12:39 Tomasz Pala
2022-01-03 15:40 ` Tomasz Pala
2022-01-04 0:25 ` Bart Schaefer
2022-01-05 19:46 ` Tomasz Pala
2022-01-05 20:11 ` Bart Schaefer
2022-01-06 1:52 ` Tomasz Pala
2022-01-06 10:38 ` Tomasz Pala
2022-01-05 20:15 ` Tomasz Pala
2022-01-05 20:25 ` Bart Schaefer [this message]
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=7ZZhb0XVqt+ONLnk9bdH8HvFS5UbKFMt9-nf1n0L0pfFg@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=gotar@polanet.pl \
--cc=zsh-users@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).