dragora-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dragora-members] Qi 2.0rc14


From: Matias Fonzo
Subject: Re: [Dragora-members] Qi 2.0rc14
Date: Fri, 24 Jul 2020 18:29:32 -0300
User-agent: Roundcube Webmail/1.4.6

El 2020-07-24 17:42, Michael Siegel escribió:
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.

What's wrong with printf?.

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.


This is not mandatory as other GNU software contains a long description (more than one line). I see this more descriptive than a single line.

About Qi's manual page, there is not much to consult, since it is oriented to the texinfo manual/guide.


Best
Michael

[1]
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_04
[2] Here's an example:
https://vcs.malbolge.net/msi/mote/-/blob/2485e8f67d53ea226d598cbcf4e9386f75fbbb57/mote#L1102



reply via email to

[Prev in Thread] Current Thread [Next in Thread]