Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug: _files depends on extendedglob
- X-seq: zsh-workers 52851
- From: Ben Knoble <ben.knoble@xxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: bug: _files depends on extendedglob
- Date: Fri, 29 Mar 2024 13:44:41 -0400
- Archived-at: <https://zsh.org/workers/52851>
- In-reply-to: <CAHYJk3Spy=QUF_Kpy19TAniu8n7TdW2owVh9=zamko359MUtVw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHYJk3Spy=QUF_Kpy19TAniu8n7TdW2owVh9=zamko359MUtVw@mail.gmail.com>
> Le 29 mars 2024 à 13:23, Mikael Magnusson <mikachu@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author