[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `eval` pollutes the history when it runs "set -o history"
From: |
_y |
Subject: |
Re: `eval` pollutes the history when it runs "set -o history" |
Date: |
Tue, 11 Jun 2019 15:38:50 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 |
Chet Ramey wrote (2019-06-10 15:22):
> On 6/8/19 3:41 PM, _y@crans.org wrote:
>>
>> What makes me think it is an actual bug is that when the
>> "history" option was already enabled, "set -o history" should
>> have no effect; yet lines before are not recorded, and lines
>> after are recorded.
>
> Bash temporarily stops recording commands in the history when you use
> `eval', but if you turn history back on explicitly using `set -o history',
> it will honor that.
In that case, shouldn’t `eval "set -o"' report that the "history" option
is off while `eval' is running? Currently, it says me that it is on.
While we are at it, are there other special behaviors of `eval` that one
should be aware of, particularly regarding doing `eval $(set +o)' ? The
manual does not say much about the `eval' builtin.
Thanks for your input! (and for Bash, of course)
--
@_y
signature.asc
Description: OpenPGP digital signature