cli-engine icon indicating copy to clipboard operation
cli-engine copied to clipboard

-h flags not allowed

Open jdx opened this issue 7 years ago • 3 comments

we should either remove -h as a helper to display help, or do the parsing before we display help so that -h is a fallback to help if the command doesn't specify any flags with -h as a char

jdx avatar Jul 28 '17 18:07 jdx

@jdxcode you Ok with dropping -h for help (see PR)?

RasPhilCo avatar Oct 06 '17 17:10 RasPhilCo

actually no, I realize this contradicts what I said before but I feel we should leave -h in. But we should be able to accept -h as a potential argument if it doesn't match anything else. For example:

$ heroku apps:info help # show info for the app 'help'
$ heroku apps:info -h # show info for the app '-h'. not a valid app, but just because something 'looks' like a flag doesn't mean it is one
$ heroku apps:info foo help # display help since info takes 1 arg
$ heroku apps:info foo -h # display help since info takes 1 arg

jdx avatar Oct 06 '17 17:10 jdx

any changes here should probably go into cli-flags instead of the parser in cli-engine-command since that is going away

jdx avatar Oct 06 '17 18:10 jdx