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

Show only officially supported commands in help text #3751

Conversation

mulkieran
Copy link
Member

No description provided.

Suppress showing any choices in the argument help, but show a column of
the supported executable names below the auto-generated help text.

Any of the executable names can still be selected, just as before.

Signed-off-by: mulhern <[email protected]>
@mulkieran mulkieran self-assigned this Jan 31, 2025
@mulkieran
Copy link
Member Author

mulkieran commented Jan 31, 2025

The new help looks like this:

$ ./target/release/stratisd-tools --help
Top-level command used to invoke one of a set of stratisd tools

Usage: stratisd-tools <EXECUTABLE>

Arguments:
  <EXECUTABLE>  

Options:
  -h, --help     Print help
  -V, --version  Print version

Executables:
* stratis-dumpmetadata

Whereas the current help looks like this:

$ ./target/release/stratisd-tools --help
Top-level command used to invoke one of a set of stratisd tools

Usage: stratisd-tools <EXECUTABLE>

Arguments:
  <EXECUTABLE>  [possible values: stratis-checkmetadata, stratis-dumpmetadata, stratis-printmetadata]

Options:
  -h, --help     Print help
  -V, --version  Print version

This change allows us to hide the tools that we are not documenting or releasing yet. Also, in the future, we are likely to release more of these tools, just as thinp has done and the list if it was just a line after <EXECUTABLE> would get long an jumbly. This way, it is possible to have a nicely formatted list at the the end.

The executable can still be invoked in exactly the same way.

$ ./target/release/stratisd-tools stratis-checkmetadata

or by adding a link to the stratisd-tools executable.

@mulkieran mulkieran marked this pull request as ready for review January 31, 2025 18:47
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/stratis-storage-stratisd-3751
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

2 similar comments
Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/stratis-storage-stratisd-3751
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/stratis-storage-stratisd-3751
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@mulkieran mulkieran removed the request for review from drckeefe January 31, 2025 20:01
@mulkieran mulkieran merged commit 2fdcc07 into stratis-storage:master Jan 31, 2025
46 checks passed
@mulkieran mulkieran deleted the make-unsupported-cmds-invisible-in-help branch January 31, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants