nmh-workers
[Top][All Lists]
Advanced

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

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


From: Ralph Corderoy
Subject: [Nmh-workers] whatnow(1)'s -prompt.
Date: Wed, 09 Aug 2017 16:49:12 +0100

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



reply via email to

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