On 4/1/18 6:54 AM, Martijn Dekker wrote:
> $ bash -c 'trap "echo WHOA" ERR; command false'
> WHOA
> WHOA
>
> Expected output: just one WHOA (as on *ksh, zsh)
Thanks for the report. This clearly falls under this clause
"In every other respect, if command_name is not the name of a function, the
effect of command (with no options) shall be the same as omitting command."
in the Posix description of `command'. It should be a one-line fix.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/