Fix: external_subcommand does not 'tab complete' in ZSH#6027
Fix: external_subcommand does not 'tab complete' in ZSH#6027epage merged 2 commits intoclap-rs:masterfrom
Conversation
|
Sorry, forgot to call this out in the last round: I asked for more details on a solution in the issue
|
|
The issue lays in the fact that the completions only consider specified options: Any other option will not get tab-completed. For external subcommands, the options are inherently not specified. But by only having specified variables in the completions the tab complete does not function. The fix is to allow the default zsh autocomplete for other variables. So This would be added to the completions by the pr, fixing the issue: explanation by GPT-4.1:
I've tested the change by running zsh in a docker container, and found the solution to be working perfectly, if needed you can try with the following commands: Anything in particular that needs to be explained further? |
|
As I'm not in a position to evaluate the accuracy of GPT derived responses, I would ask that you refrain from using them. I'd like to better understand the significance of the |
|
By setting Other than that I have not seen the tag used in ZSH. |
|
Thanks! |
Proposal for #6016.
Same fix is applied as in the linked issue. Added zsh only test since the issue only persists on zsh.
This fix allows default completions on external commands. Right now the completions are disabled, making for an annoying DX. The behaviour is now in line with bash, fish.