bug-bash
[Top][All Lists]
Advanced

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

Re: 'fc' outputing text of DEBUG trap


From: Boruch Baum
Subject: Re: 'fc' outputing text of DEBUG trap
Date: Mon, 30 Oct 2017 08:06:16 -0400
User-agent: NeoMutt/20170609 (1.8.3)

On 2017-10-28 15:40, Chet Ramey wrote:
> 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:

@Eduardo: thanks.

> Bash enables the verbose option while running the commands `fc' specifies
> for executiont, 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:

Is there a way to optionally turn off the verbose option for traps when
running 'fc'? Toggling the verbose option from the command line only
makes things more verbose for me (it echoes $PROMPT_COMMAND).

For me, the desirable behavior would be for the default to inherit the
behavior from outside the 'fc' command, with the exception that the
actual lines being executed by 'fc' be always echoed.

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0



reply via email to

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