Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command consistency #645

Closed
jsejcksn opened this issue Jan 30, 2020 · 2 comments · Fixed by #647
Closed

Command consistency #645

jsejcksn opened this issue Jan 30, 2020 · 2 comments · Fixed by #647

Comments

@jsejcksn
Copy link
Contributor

jsejcksn commented Jan 30, 2020

Hi, I'm learning about asdf 👋

While I read the documentation, I am seeing similar versions of commands and not sure if they're just the same command with varying syntax or different commands, and it's kind of confusing.

Some examples are:

  • asdf plugin-add and asdf plugin-list (with a -)
  • asdf plugin add and asdf plugin list (with a )

Perhaps instances of these can be combined/cleaned up (or clarified) in the next minor release?

@vic
Copy link
Contributor

vic commented Jan 30, 2020

Both syntax are equivalent and actually refer to the very same command.

The original syntax for commands was using dashes, eg plugin-add. The space syntax is an effort to try normalize the CLI to a more common subcommand interface just like other popular utils do, like git, eg asdf plugin should include all subcommands for managing plugins and will later display help if you give it no arguments.

But, like I said, both syntaxes are equivalent, since we want to keep backwards compatibility for scripts people already use on their CI environment that use the old dash syntax.

Also, now it's possible for plugins to introduce new asdf commands and extend asdf funtionality all of them under the asdf command line tool.

Yes, we should update the documentation to reflect the new space command syntax. PRs welcome :).

@jsejcksn
Copy link
Contributor Author

@vic Thanks. Based on what you said, I understand that the hyphenated asdf command-subcommands are aliases to specific asdf command subcommands.

Is shim-versions the only exception? I'm starting a PR and want to get it right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants