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: Eduardo Bustamante
Subject: Re: 'fc' outputing text of DEBUG trap
Date: Fri, 27 Oct 2017 09:53:09 -0500

On Fri, Oct 27, 2017 at 1:21 AM, Boruch Baum <address@hidden> 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:

address@hidden:~$ HISTFILE=/dev/null bash --norc --noprofile -O extdebug
bash-4.4$ trap ': it is a trap' DEBUG
bash-4.4$ echo hi
hi
bash-4.4$ history
    1  trap ': it is a trap' DEBUG
    2  echo hi
    3  history
bash-4.4$ fc -e true 1 3
trap ': it is a trap' DEBUG
: it is a trap
echo hi
: it is a trap
hi
history
: it is a trap
    1  trap ': it is a trap' DEBUG
    2  echo hi
    3  history
    4  trap ': it is a trap' DEBUG
    5  echo hi
    6  history
bash-4.4$
GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)



reply via email to

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