nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Starting the final call for features for 1.7

2016-10-12 04:52:00
Hi Oliver,

Just two failures left:
    usage: script [ -a ] [ typescript ]
...
This is a new check with the welcome message stuff.  Judging from
online man pages for script, this will have problems on other systems
too. OpenBSD for example, only seems to have a -a option for script.
Can't we redirect standard input on it to provide the command?

I doubt it.  I think the test is mhparam(1)'s checking for a TTY on FDs
0, 1, and 2.  OpenBSD's man page says $SHELL is used.  Perhaps the test
can make use of this.

    $ cat >cmd
    #! /bin/sh

    mhparam path
    $ chmod +x cmd
    $ SHELL=`pwd`/cmd script
    Script started, file is typescript
    mail
    Script done, file is typescript
    $ cat -A typescript
    Script started on Wed 12 Oct 2016 10:38:22 BST$
    mail^M$
    $
    Script done on Wed 12 Oct 2016 10:38:22 BST$
    $

It took a bit of tracking down to find the bad substitution but it
seems to be from the w3m invocation being passed ${charset:+-I
"$charset"}

The space between -I and the charset is the problem.

Interesting.  bash and dash are both happy with the space here.

    $ unset foo; bar= xyzzy=42; echo ,${foo:+a b},${bar:+c d},${xyzzy:+e f},
    ,,,e f,
    $ echo ,${xyzzy:+e "$USER"},  
    ,e ralph,
    $

And my reading of POSIX says everything up to the closing brace is valid
for `word'.

w3m doesn't seem to actually require that space so it could simply be
removed.

Yep.  When two words are required, the test could be duplicated.

    ${charset:+-I} ${charset:+"$charset"}

-- 
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>