[Top][All Lists]

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

Re: [BUG] ERR trap triggered twice when using 'command'

From: Chet Ramey
Subject: Re: [BUG] ERR trap triggered twice when using 'command'
Date: Mon, 2 Apr 2018 15:41:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 4/1/18 6:54 AM, Martijn Dekker wrote:
> $ bash -c 'trap "echo WHOA" ERR; command false'
> 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.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

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