FuelLabs / sway

🌴 Empowering everyone to build reliable and efficient smart contracts.
https://docs.fuel.network/docs/sway/
Apache License 2.0
62.84k stars 5.35k forks source link

`forc`: Add a manual `clap` `--help` implementation that also lists plugin-provided commands #3831

Open mitchmindtree opened 1 year ago

mitchmindtree commented 1 year ago

It's nice that we can support new commands via plugins, but the fact that they don't show up in the default --help output is probably confusing for users who 1. don't realise those plugin-commands don't show up in the default help or 2. that some commands are even provided by plugins.

We should consider a manual implementation of --help that includes the plugin-provided commands too.

sdankel commented 1 year ago

One way that might work to preserve the ability to add new plugins without touching forc code itself would be to use clap's after_help to list the subcommands provided from the installed plugins. We could probably even format the text so they look like they're part of the core subcommands.

eightfilms commented 1 year ago

This previously opened issue regarding forc --list might be helpful: https://github.com/FuelLabs/sway/issues/702