oclif / plugin-help

standard help for oclif
MIT License
25 stars 30 forks source link

Hiding the Help Values #53

Closed GregSithole closed 8 months ago

GregSithole commented 4 years ago

Hi Guys

I wanted to find out if there is a way to remove the helpValue or at least keep it hidden. So currently it has the following format:

describe the command here

USAGE
  $ wallhaven-downloader

OPTIONS
  -a, --atleast=atleast                                              Atleast - Minimum allowed resolution
  -c, --category=category                                            Category - Field used to specify the category type for the search
  -o, --order=desc|asc                                               [default: desc] Order - Order of the search results
  -p, --purity=purity                                                Search Purity - Field used to control the purity of the search
  -q, --query=query                                                  Search Query - Field used to search for wallpapers
  -r, --resolutions=resolutions                                      Resolution - A list or single resolution for the wallpapers
  -s, --sorting=date_added|relevance|random|views|favorites|toplist  [default: date_added] Sorting - Field used to sort wallhaven's results
  -v, --version                                                      Version - Current version of @gregsithole/wallhaven-downloader

But what I want is:

describe the command here

USAGE
  $ wallhaven-downloader

OPTIONS
  -a, --atleast                                             Atleast - Minimum allowed resolution
  -c, --category                                            Category - Field used to specify the category type for the search
  -o, --order                                              [default: desc] Order - Order of the search results
  -p, --purity                                                Search Purity - Field used to control the purity of the search
  -q, --query                                                  Search Query - Field used to search for wallpapers
  -r, --resolutions                                      Resolution - A list or single resolution for the wallpapers
  -s, --sorting Sorting - Field used to sort wallhaven's results
  -v, --version                                                      Version - Current version of @gregsithole/wallhaven-downloader
RasPhilCo commented 4 years ago

flags have a property helpValue that can be set: https://github.com/oclif/config/blob/master/src/command.ts#L114

childish-sambino commented 4 years ago

helpValue will change what's on the right side of the =, but won't hide the =: https://github.com/oclif/plugin-help/blob/master/src/command.ts#L135-L140

GregSithole commented 4 years ago

@childish-sambino is right, regardless of whether we set the value to an empty string, the = would still appear... I think there needs to be an additional option for the flag, something like displayHelpValue to show help value if you wanted.

RasPhilCo commented 4 years ago

Not indicating that a flag takes are argument is confusing, how would this be useful?

GregSithole commented 4 years ago

@RasPhilCo Hmmm yeah you right on that it would be confusing. Okay, I think what we can fix is the = sign. I think that should be an empty space... So instead of having -q, --query=<query>, we can instead have -q, --query <query>

RasPhilCo commented 4 years ago

Cool! I will address this in the help rewrite.

GregSithole commented 4 years ago

Cool thanks man!