Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Doing useful things in completers
- X-seq: zsh-workers 49253
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Doing useful things in completers
- Date: Fri, 6 Aug 2021 10:00:29 -0700
- Archived-at: <https://zsh.org/workers/49253>
- In-reply-to: <CAHYJk3QShe=QkOdFfvbwSosk3eF4ckwUSj+vu=yfyNemCgfvfQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHYJk3QShe=QkOdFfvbwSosk3eF4ckwUSj+vu=yfyNemCgfvfQ@mail.gmail.com>
On Thu, Aug 5, 2021 at 9:44 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> This came up on irc, someone was complaining that file completion
> didn't work, turns out the situation they were trying was: mysql
> --ssl-ca=/home/<tab>
>
> The completer itself hasn't been updated since 2004, and of course we
> could add all new options etc to it (and probably should), but I'm
> curious if there's some handy way you can rewrite this so that file
> completion would be tried for unknown options here (eg, the user
> already typed the full option name including the trailing equal sign)?
I'm not sure about the mysql completion function in particular, but
adding this to the completer zstyle should help:
_fileoption () {
compset -P '-*=' && _files
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author