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

Detect --help, and run help #102

Open
aaroncrespo opened this issue Mar 31, 2017 · 2 comments
Open

Detect --help, and run help #102

aaroncrespo opened this issue Mar 31, 2017 · 2 comments

Comments

@aaroncrespo
Copy link

aaroncrespo commented Mar 31, 2017

Unrecognized command: '--help'. See carthage help. is not as helpful as it could be when parsing commands

if the argument that failed to parse contains help but was not exactly "executable help" the error should be printed and executable help should be run.

Maybe even -h

@aaroncrespo
Copy link
Author

aaroncrespo commented Mar 31, 2017

Im not sure the feasibility but

-  fputs("Unrecognized command: '\(verb)'. See `\(executableName) help`.\n", stderr)
+  fputs("Unrecognized command: '\(verb)'. See `\(executableName) help`.\n", stderr)
+  if NSRegularExpression(pattern: "-h|help|--help", options: []).numberOfMatches(verb) > 0 {
+    _ = run(command: "help", arguments: [])
+  }  

@NachoSoto
Copy link
Contributor

Same for carthage {command} --help as an equivalent to carthage help command. I think this will help a lot of people (including me, who always forgets this syntax).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants