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: Chet Ramey
Subject: Re: 'fc' outputing text of DEBUG trap
Date: Mon, 30 Oct 2017 08:53:31 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/30/17 8:06 AM, Boruch Baum wrote:

> 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.

Well, there's the rub. The way to get the lines executed by fc is to turn
on verbose mode. The way to get around it is to turn off verbose mode when
executing traps, or at least the DEBUG trap, as ksh93 does, for instance.
I don't know how many people, if any, are relying on the current behavior.

-- 
``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/



reply via email to

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