Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: wormhole-rs completion not working ?



On Mon, 09 Jun 2025 19:44, Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
On 2025-06-09 at 18:31 +0200, Matthias Geiger wrote:
I'm the maintainer of wormhole-rs [0] in Debian, which is written in Rust
and uses clap-complete (a rust library) during the build to generate the
completion files. They work for bash and fish OOTB as expected. However, in
zsh they don't and I want to know why.

compdef _wormhole-rs wormhole-rs
 _wormhole-rs() { #compdef wormhole-rs

That first line should start '#compdef' not 'compdef'.

I use wormhole-rs but hadn't bothered setting up completion for it.  I
just did.  After inserting the '#' at the start, it mostly works.

 % wormhole-rs
 completion      -- Generate shell completions for the wormhole CLI
 forward         -- Forward ports from one machine to another
 help            --
 receive     rx  -- Receive a file or a folder
 send        tx  -- Send a file or a folder
 send-many       -- Send a file to many recipients

(wormhole-rs itself hides 'completion' as a sub-command, so the
generation should probably be honouring that, and perhaps dropping
'help' too.)

Hi,ope
thanks for confirming my suspicions. I'll file a bug then with clap-complete.

best,

werdahias




Messages sorted by: Reverse Date, Date, Thread, Author