-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add a forc plugins
command for listing all plugins
#1199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! only thing I can think of for future reference is that we're just checking that the file exists and starts with forc-
, should we not create a struct with the possible plugins and use that to match instead? or is this method of checking enough?
We won't actually ever know what all the plugins are. The idea is that this is user-extensible, so users can write their own |
Closes #1198. Lists the full path to every `forc-*` plugin discovered under the user's `PATH`. For example: ```sh [mindtree@minddesk:~]$ forc plugins /home/mindtree/.cargo/bin/forc-fmt /home/mindtree/.cargo/bin/forc-explore /home/mindtree/.cargo/bin/forc-lsp ``` We could potentially add flags to this command in the future for: - only emitting executable names (not full paths) - printing versions and descriptions in a table - outputting via JSON or TOML for easier machine digestion. For now, this PR just aims to add initial support. The logic included in this should make it easier to include available plugin commands in a future `forc --list` command too (ala #702).
9645b3e
to
039cf16
Compare
Can you file some good first issues for those? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Closes #1198.
Lists the full path to every
forc-*
plugin discovered under the user'sPATH
.For example:
[mindtree@minddesk:~]$ forc plugins /home/mindtree/.cargo/bin/forc-fmt /home/mindtree/.cargo/bin/forc-explore /home/mindtree/.cargo/bin/forc-lsp
We could potentially add flags to this command in the future for:
For now, this PR just aims to add initial support.
The logic included in this should make it easier to include available
plugin commands in a future
forc --list
command too (ala #702).