mbland / go-script-bash

Framework for writing modular, discoverable, testable Bash scripts
ISC License
95 stars 16 forks source link

Optionally hijacks -h/--help options #254

Open nkakouros opened 4 years ago

nkakouros commented 4 years ago

cc: @mbland

Generally, it is a good practice to have -h, --help or -help print the help for a command. Right now, it is required that every new command that the users create to implement this. This PR adds a flag to enable go-core.bash to hijack these options and print the command help whenever they are present.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.04%) to 95.032% when pulling 771f9c2086c7aebfc829c7d255bc38c907c28dc2 on nkakouros-forks:help-hijack into 292e0803074eb538ab8633a657c53d3a975ba922 on mbland:master.