Am 24.07.20 um 20:51 schrieb Matias Fonzo:
Attached is Qi 2.0rc14, which removes the replacement for basename(1)
and dirname(1)...
Thanks!
Better to keep it simple, right?. ;-)
That's what I thought. :)
Okay, next thing: I would suggest using a "here-document"[1] to
implement the `usage()' function. This will make the code much more
readable.
The only disadvantage of using that method is with indentation:
Either you decide to use tabs to indent code like in the rest of
the script and have them stripped from the heredoc when it is printed
out. If you do that, you will have to use spaces to indent the actual
content of `usage()'.
Or you don't use code indentation in that function and have the
heredoc's content interpreted as pre-formatted text. Then you can use
whatever indentation method you like for the content.
I always do it the second way because I don't use tabs for
indentation.[2] For Qi, however, doing it the first way is probably
better.
As far as the content of `usage()' goes, I think the description of Qi
should be kept to a single line. That's pretty much what most GNU-ish
command-line tools do, in my experience. People who want to know more
should consult the manual page. I would keep the description as the
first thing in the output of `usage()', however.