[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'fc' outputing text of DEBUG trap
From: |
Chet Ramey |
Subject: |
Re: 'fc' outputing text of DEBUG trap |
Date: |
Sat, 28 Oct 2017 15:40:42 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 10/27/17 10:53 AM, Eduardo Bustamante wrote:
> On Fri, Oct 27, 2017 at 1:21 AM, Boruch Baum <boruch_baum@gmx.com> wrote:
>> In Debian, using Bash version 4.4, path level 12, I've set a DEBUG trap
>> in my .bashrc and tried running the following command, with the
>> following output resulting. The five lines between the command being run
>> by fc and that command's output, is the text of the DEBUG trap.
>
> Here's a short reproducer:
Bash enables the verbose option while running the commands `fc' specifies
for execution, since the historical practice is to echo the commands before
they get executed. Bash doesn't turn off the verbose option while running
trap commands (though it could; ksh93 does), so the trap commands get
echoed as well.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/