Skip to content

Why reserving '-h' for help option? #9

@Explorer09

Description

@Explorer09

The template seems to deliberately reserve -h flag for the predefined --help option. While I appreciate that some shell scripts do use -h for help option (for user convenience), but what's the rationale of imposing it in the template? My concern is that -h could be used for other things depending on application (one use that came to my mind is --no-dereference in utilities such as touch and chown), and applications should be able to let help text be invoked only via the long --help option.

Another problem I observed is when COMMANDLINE_OPTION_DISPLAY_HELP_SHORT is set to empty, then an empty argument string '' might trigger the help text display. What I expected is that it would disable the short option for help text and accept only the long option for help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions