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

feat: only show forc examples with explicit --help flag #6013

Merged
merged 3 commits into from
May 15, 2024

Conversation

kayagokalp
Copy link
Member

@kayagokalp kayagokalp commented May 15, 2024

Description

closes #6005.

As stated in the issue, executing forc prints huge output with examples etc. This is not ideal because it is very hard to navigate to list of commands especially with smaller screens. This PR changes the behavor such that executing just forc will print:

Fuel Orchestrator

Usage: forc [OPTIONS] <COMMAND>

Commands:
  addr2line       Show location and context of an opcode address in its source file
  build           Compile the current or target project [aliases: b]
  check           Check the current or target project and all of its dependencies for errors
  clean           Removes the default forc compiler output artifact directory, i.e. `<project-name>/out`
  completions     Generate tab-completion scripts for your shell
  new             Create a new Forc project at `<path>`
  init            Create a new Forc project in an existing directory
  parse-bytecode  Parse bytecode file into a debug format
  test            Run the Sway unit tests for the current project [aliases: t]
  update          Update dependencies in the Forc dependencies directory
  plugins         List all forc plugins
  template        Create a new Forc project from a git template
  contract-id     Determine contract-id for a contract. For workspaces outputs all contract ids in the workspace
  predicate-root  Determine predicate-root for a predicate. For workspaces outputs all predicate roots in the workspace
  help            Print this message or the help of the given subcommand(s)

Options:
  -v, --verbose...             Use verbose output
  -s, --silent                 Silence all output
  -L, --log-level <LOG_LEVEL>  Set the log level
  -h, --help                   Print help (see more with '--help')
  -V, --version                Print version

with --help flag we still show the examples etc.

@kayagokalp kayagokalp added enhancement New feature or request forc labels May 15, 2024
@kayagokalp kayagokalp self-assigned this May 15, 2024
@kayagokalp kayagokalp changed the title feat: only show examples with explicit --help flag feat: only show forc examples with explicit --help flag May 15, 2024
@kayagokalp kayagokalp enabled auto-merge (squash) May 15, 2024 00:15
@kayagokalp kayagokalp requested a review from a team May 15, 2024 00:15
@kayagokalp kayagokalp disabled auto-merge May 15, 2024 00:15
@kayagokalp kayagokalp enabled auto-merge (squash) May 15, 2024 00:15
@kayagokalp kayagokalp disabled auto-merge May 15, 2024 00:17
@kayagokalp kayagokalp enabled auto-merge (squash) May 15, 2024 00:17
@JoshuaBatty JoshuaBatty requested a review from a team May 15, 2024 01:26
@kayagokalp kayagokalp merged commit 9a8796b into master May 15, 2024
69 checks passed
@kayagokalp kayagokalp deleted the kayagokalp/6012 branch May 15, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide examples section of forc help message, only show them with a flag
3 participants