-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a
forc plugins
command for listing all plugins
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).
- Loading branch information
1 parent
800c33c
commit 9645b3e
Showing
6 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use anyhow::Result; | ||
|
||
pub(crate) fn exec() -> Result<()> { | ||
for path in crate::cli::plugin::find_all() { | ||
println!("{}", path.display()); | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters