Problem with mutt script

Vincent Lefevre vincent at
Thu Apr 26 08:42:11 UTC 2018

On 2018-04-23 14:25:29 -0500, Derek Martin wrote:
> [Then again, I made the same arguments about binutils removing the
> -[number] option to head and tail, and the maintainers went ahead and
> did it anyway. Of course, they finally realized their mistake, and PUT

This is different: there was no good reason to remove -[number]
(it's rather clean, contrary to test's -o). And it is also very
useful in interactive use as this is a bit shorter (thus faster
to type) than -n [number].

> In general, the only way the compount -o  wouldn't work is if you
> write some syntax where the shell can't disambiguate the binary
> operator from the unary operator.  It's actually somewhat hard to do
> this unintentionally,

No, not hard: it suffices that the pathname be arbitrary, e.g. an
argument provided by the user (who may not be the author and owner of
this script) or some existing pathname (e.g. created by a malicious

> and easy to avoid...  The primary way this would
> happen is if you didn't quote a shell variable which was empty, though
> that will often also cause other related syntax errors.  There are
> probably other ways.  All of them can be avoided if you use parens to
> group your expressions (but you have to be careful to quote the parens
> properly).

But almost no-ones use parens.

Vincent Lefèvre <vincent at> - Web: <>
100% accessible validated (X)HTML - Blog: <>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

More information about the Mutt-dev mailing list