18.04.2014 10:25, Fam Zheng wrote: > There are two paths to show help and exit, one is with "-h" or "--help", > one is with invalid options. > > Only "exit 1" with the latter case.
I'd rather put `exit 1' right in invalid option case, instead of jumping to help. Because help output is huge, and it is often difficult to see the error message. At max, at the error case, the script can output something like, `for a list of valid options, run $0 --help'. Here and for qemu-img case. Do you not agree? Thanks, /mjt