greymd / teip

Masking tape to help commands "do one thing well"
MIT License
569 stars 19 forks source link

exit codes for --version and --help #29

Closed balupton closed 2 years ago

balupton commented 2 years ago

--version should return a 0 exit code, currently it returns 1

--help should return a 0 exit code or 22 which is EINVAL 22 Invalid argument

this allows commands that check to see if the command is actually working to do so:

https://github.com/bevry/dorothy/blob/master/commands/command-working

greymd commented 2 years ago

Thank you. I will work on it for next version.

greymd commented 2 years ago

@balupton Hi, This behavior has been fixed at v1.2.2.

$ teip --version
teip 1.2.2
$ echo $?
0
$ teip --help &> /dev/null
$ echo $?
0

If you have any other issues, please let me know.