nmh-workers
[Top] [All Lists]

[Nmh-workers] whatnow(1)'s -prompt.

2017-08-09 10:49:33
Hi,

What use is whatnow(1)'s -prompt option?  The man page says

    The -prompt string switch sets the prompting string for whatnow.

It doesn't document that it's subject to printf(3) expansion and
provided with a single argument that's the program's name, i.e.
"whatnow", unless you copy it to something else.

    $ for s in '_%s_' '_%s_%s_' '_%12s_%.3g_'; do
    >     whatnow -prompt "$s" </dev/null
    >     echo
    > done
    _whatnow_
    _whatnow_(null)_
    _     whatnow_7.26e-322_
    $

I'm wondering if it can be axed, now.  Or if not, it downgraded from a
format string to just a plain string so the program name isn't
substituted.  Worst case, it will have to undergo a simple "%s"
substitution, just the one, with no means of escaping it.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>
  • [Nmh-workers] whatnow(1)'s -prompt., Ralph Corderoy <=