GNU-Bash-Shell-Script-Template
GNU-Bash-Shell-Script-Template copied to clipboard
Why reserving '-h' for help option?
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.