Help overriding a single flag’s completion action
Langbart <[email protected]> Sat, 11 Oct 2025 08:25:44 +0000
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <ODnvLTKj2DqepJxxzSagescOIp7mj6nuw1CgWQdDAm1fVFcfYrXChVGyYrcPEdbI9xYLwW2ggJs5gE8tp3KgZjNKKgupj2nkG1r3OVgGvug=@protonmail.com> |
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?