Re: wormhole-rs completion not working ?

Phil Pennock <[email protected]>
Newsgroups gmane.comp.shells.zsh.user
Message-ID <[email protected]>
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.)

-Phil
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.