Skip to content

Detect --help, and run help #102

Description

@aaroncrespo

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

Activity

  1. aaroncrespo commented on Mar 31, 2017

    @aaroncrespo
    Author

    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: [])
    +  }  
  2. NachoSoto commented on Mar 31, 2017

    @NachoSoto
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions