From: Ben Knoble <ben.knoble@gmail.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: zsh-workers@zsh.org
Subject: Re: bug: _files depends on extendedglob
Date: Fri, 29 Mar 2024 13:44:41 -0400 [thread overview]
Message-ID: <5B64A18E-CDA7-4C5F-8CA6-955832F23E77@gmail.com> (raw)
In-Reply-To: <CAHYJk3Spy=QUF_Kpy19TAniu8n7TdW2owVh9=zamko359MUtVw@mail.gmail.com>
> Le 29 mars 2024 à 13:23, Mikael Magnusson <mikachu@gmail.com> a écrit :
>
> The completion system sets up the options it uses on entry, if you
> change them you get to keep the pieces.
Good to know; I think I assumed that.
> (Why are you setting the
> emulation mode in a completer function anyway?)
In the linked commit from the original mail I explain the emulation mode: it is because the contributed Git completion script sets the emulation mode to ksh in order to leave most of the work to the bash completion scripts. I therefore (assume I) have to revert to zsh mode for _files to behave sensibly: not doing so produced a strange IIRC.
> If you for whatever
> reason insist on doing this, then you can setopt $_comp_options to
> restore the correct option set before calling _files.
That’s probably a much better workaround than what I had, thanks. I’ve confirmed that it works. Is this documented anywhere that I can rely on?
> --
> Mikael Magnusson
next prev parent reply other threads:[~2024-03-29 17:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-29 15:50 D. Ben Knoble
2024-03-29 17:23 ` Mikael Magnusson
2024-03-29 17:44 ` Ben Knoble [this message]
2024-03-29 19:40 ` Bart Schaefer
2024-03-29 19:43 ` Oliver Kiddle
2024-03-30 15:27 ` D. Ben Knoble
2024-03-30 15:46 ` Bart Schaefer
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=5B64A18E-CDA7-4C5F-8CA6-955832F23E77@gmail.com \
--to=ben.knoble@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).