Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Help overriding a single flag’s completion action
- X-seq: zsh-users 30378
- From: Langbart <Langbart@xxxxxxxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Help overriding a single flag’s completion action
- Date: Sat, 11 Oct 2025 08:25:44 +0000
- Archived-at: <https://zsh.org/users/30378>
- Feedback-id: 20607877:user:proton
- List-id: <zsh-users.zsh.org>
Guten Tag,
I’m trying to override the completion behavior for one specific flag of a
command, while leaving the rest of the command’s completions unchanged.
Environment: zsh 5.9 (macOS 15)
The completion file in question is:
https://github.com/danielmiessler/Fabric/blob/main/completions/_fabric
This file is automatically added to my FPATH when installed via Homebrew, and
the completion works as intended.
My goal is to override the values displayed for one option — the "--model"
flag — where I would like to provide my own values.
Currently, I copy the original completion file to my own completion folder and
manually edit the function responsible for the completion of the "--model" flag.
This approach works as expected.
Of course, I would like to avoid maintaining a copy of the original file and
instead override only the specific function used to generate the options that
can be passed to the --model flag.
Could you advise on the correct approach?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author