noir-lang / noir

Noir is a domain specific language for zero knowledge proofs
https://noir-lang.org
Apache License 2.0
884 stars 193 forks source link

Setup `bash`/`zsh` command-line completion for `nargo` #6284

Open michaeljklein opened 2 weeks ago

michaeljklein commented 2 weeks ago

Problem

Tab-completion in bash and zsh for nargo would be helpful so that typing partial commands like nargo co<TAB> or nargo n<TAB>, the commands are completed to nargo compile, nargo new, respectively.

Happy Case

Setup tab completion for the commonly used shells bash and zsh

Workaround

Yes

Workaround Description

  1. Use "short" versions of commands where available (e.g. check, execute) or else enable them for other commands
  2. Type the whole command

Additional Context

No response

Project Impact

Nice-to-have

Blocker Context

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

TomAFrench commented 1 week ago

Kev mentioned there are some addons we can use for clap to improve the CLI experience: https://github.com/noir-lang/noir/issues/3159

Specific to this issue there is clap_complete.