gravitino icon indicating copy to clipboard operation
gravitino copied to clipboard

[MINOR] Improvement(cli): Refactor the help command.

Open Abyss-lord opened this issue 8 months ago • 1 comments

What changes were proposed in this pull request?

Refactor the help command.

Why are the changes needed?

just a draft

Does this PR introduce any user-facing change?

Better help command.

How was this patch tested?

local test.

Abyss-lord avatar Apr 21 '25 07:04 Abyss-lord

I'm currently on holiday, so only had a quick look, I have some minor concerns:

  • It doesn't use the existing library's functionality when it could
  • It's less flexible when it comes to possible future changes like internationalisation
  • It changes existing functionality outside of the help command
  • Some of the output requires improvement

justinmclean avatar Apr 22 '25 22:04 justinmclean

I'm currently on holiday, so only had a quick look, I have some minor concerns:

  • It doesn't use the existing library's functionality when it could
  • It's less flexible when it comes to possible future changes like internationalisation
  • It changes existing functionality outside of the help command
  • Some of the output requires improvement

Hi @justinmclean , I've completed the code updates and would appreciate your review of the PR when you have a moment. plz also review the #6798 if you have time.

Abyss-lord avatar May 07 '25 02:05 Abyss-lord

Again, the added code seems to duplicate functionality that exists in the CLI library we use, why not use that? Having the help text in text files is on purpose, as this makes editing them easy.

justinmclean avatar May 07 '25 05:05 justinmclean

See for example: https://commons.apache.org/proper/commons-cli/javadocs/api-release/org/apache/commons/cli/HelpFormatter.html

justinmclean avatar May 07 '25 05:05 justinmclean