[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: Martijn Dekker
Subject: Re: [BUG] ERR trap triggered twice when using 'command'
Date: Sat, 7 Apr 2018 17:52:11 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Op 02-04-18 om 20:41 schreef Chet Ramey:
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.

Given that text, commands prefixed with 'command' maybe shouldn't appear twice in xtrace output either. (They don't in any other shell.)

$ bash -xc 'command true'
+ command true
+ true

$ dash -xc 'command true'
+ command true

$ ksh93 -xc 'command true'
+ command true

$ pdksh -xc 'command true'
+ command true

$ yash -xc 'command true'
+ command true

$ mksh -xc 'command true'
+ true

$ zsh -xc 'command true'
+zsh:1> true


- M.

reply via email to

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