I just asked the click folks if they had a mechanism for automatically showing the shell completion code and installing it, like click-completion has. They said there are no plans to add any mechanism for it. Sad. You can see the issue here:
https://github.com/pallets/click/issues/2127
Is there an update to click-completion that outputs click 8.0 compatible shell completion eval code that works?
I'm using click 8.0.3 and the completion code generated doesn't work.
Here is a sample
└─> aprsd completion show
#compdef aprsd
_aprsd() {
eval $(env COMMANDLINE="${words[1,$CURRENT]}" _APRSD_COMPLETE=complete-zsh aprsd)
}
if [[ "$(basename -- ${(%):-%x})" != "_aprsd" ]]; then
compdef _aprsd aprsd
fi
╭─aprsd on master [$!?] via 🐍 v3.8.5 (.venv) ❯
└─> aprsd completion install
zsh completion installed in /Users/i530566/.zshrc
Unfortunately that doesn't work with click 8.0.
I updated the code in my ~/.zshrc
I just asked the click folks if they had a mechanism for automatically showing the shell completion code and installing it, like click-completion has. They said there are no plans to add any mechanism for it. Sad. You can see the issue here: https://github.com/pallets/click/issues/2127
Is there an update to click-completion that outputs click 8.0 compatible shell completion eval code that works? I'm using click 8.0.3 and the completion code generated doesn't work.
Here is a sample
Unfortunately that doesn't work with click 8.0. I updated the code in my ~/.zshrc
and that works.