tech-userlevel archive

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

Re: [PATCH 0/6] script(1) cleanups, -e to pass through exit code

    Date:        Mon, 3 Jan 2022 20:12:09 +0100
    From:        =?utf-8?B?0L3QsNCx?= <>
    Message-ID:  <>

  | I tried to make these as small and atomic as possible;

The format is ok.

  |   script.c: fix usage string

That one isn't a fix, just a change.  In man pages and other
similar places meaning for words in exampkes (distinguishing
literal data from pkaceholders for example) can be done by
various markup/formatting techniques.  Usage messages do not
have that possibility, just text.  Some applications use the
<word> nitation to indicate that "word" is not literal text,
but to be replaced by the user.  Others do not, keaving it to
either the written explanation, or just the common knowledge
of the reader to work out what should be entered as shown,
and what shoukd be replaced by the user's data.  Neither is
correct, it is just a matter if choice.

  |   script.c: use sh -c directly instead of system(3)

I'm nkt sure why that would matter, but if it is going
to change tgat way it shoukd use "sh -c -- command" so
commands tgat haopen to start with - or + are nit treated
as options by the shell (posix is going to require this
of system() and popen() - generally it is better to just
use those interfaces so enhancements to them simply
flow through to the applications.

  |   script.1: clarify that -c runs the argument via sh -c

Even if #2 was done, this is too much detail.  Users care what
happens, not the nechanism by which it is made to work.

The rest look to be more useful, but I will leave evaluation of
the need fo those to someone who uses script more than I do.


Home | Main Index | Thread Index | Old Index