autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

[rustup] subcommands are missing required arguments and autocompletion suggestions

Open neoncitylights opened this issue 3 years ago • 1 comments

Sanity checks

  • [X] My issue relates to a specific CLI completion spec (e.g. git checkout is missing options in git completion spec). If your issue is more general, please create your issue here: withfig/fig
  • [X] I have searched github.com/withfig/autocomplete/issues and there are no duplicates of my issue
  • [X] I would like to work on this.

What CLI tool does this relate to?

rustup

Which statement makes the most sense?

There are errors with this completion spec

Issue Details

I found some issues with the rustup CLI spec, after initially trying to run rustup component add:

  • --version: this option is not available in every subcommand context, only at the root (via rustup --version)
  • rustup help + rustup <subcommand> help: does not suggest subcommands
  • rustup check: does not accept any arguments, but is listed as so in the spec
  • rustup component list: accepts an optional --installed option, but isn't listed
  • rustup component <add|remove>: both subcommands require a <component> argument, but isn't listed
  • rustup default: requires a <toolchain> argument, but isn't listed
  • rustup man: requires a <subcommand> argument, but isn't listed
  • rustup override <set|unset>: both subcommands require a <toolchain> argument, but it isn't listed
  • rustup self uninstall: accepts a -y option, but isn't listed
  • rustup set: accepts a profile subcommand, but profile isn't listed
  • rustup target <add|remove>:
    • Minor typo in the toolchain argument name: <toolchain instead of <toolchain>
    • Does not provide suggestions for common targets like stable and nightly
  • rustup toolchain link <toolchain> <path>: path accepts a directory, but doesn't suggest any
  • rustup toolchain list: missing optional --verbose option which lists extra information about toolchains

neoncitylights avatar Apr 09 '22 16:04 neoncitylights

Hey @neoncitylights! Thanks for taking the initiative on this. Let me know if you get stuck on anything :)

mschrage avatar Apr 11 '22 18:04 mschrage