Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16380

Changes to HISTIGNORE are not honored when changed via a reference?

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From "James D. Lin" <jamesdlin@gmail.com>
Newsgroups gnu.bash.bug
Subject Changes to HISTIGNORE are not honored when changed via a reference?
Date Sat, 13 Jun 2020 15:17:05 -0700
Lines 48
Approved bug-bash@gnu.org
Message-ID <mailman.1854.1592093058.2541.bug-bash@gnu.org> (permalink)
References <CADPatTfW9=Hh2kuDXjs7L3XByUgS+zqUq=c62J583J0SOWO0Mw@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
X-Trace usenet.stanford.edu 1592093058 25059 209.51.188.17 (14 Jun 2020 00:04:18 GMT)
X-Complaints-To action@cs.stanford.edu
To bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=3kBxZQ8CUdRXLf2NLAucaoA2/DwsxPXibW4RgNQXH+M=; b=U4puWbWAbgzyOtlJqk1Aanld7Pae69QTcEqFk3zw8NW1RP/dZN4C2wv19W5Aaa//XC ZP5AvJM+LQPqHFrHqLzCW89ZfJvg00R0Wg20rta9jKT8RsiMs9AyN47xWSeahApfMdN/ qegsGMdc6VmQCkafPKBoHzDRLwjOtEo8djlDvRG7XwcY2OXQkrT6SUvDC9WGon8oy19C ZHESxmU9uBNkBfRmFHKQ4BHOlcFJHLSqKJNlX4Y9YrKQiM9IVzawUu4sOpy5OY5GOHSB q/C4t1/gJSLEz8F63dzKTYpRMT608pITngRI2Ld+QPIl/47+BGvq/P+AF1pL7RGlkbq6 zOAg==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=3kBxZQ8CUdRXLf2NLAucaoA2/DwsxPXibW4RgNQXH+M=; b=l+Yo98/NcKsvFz9BvCsnSnl3xKpl37+ZMNls+FJwna+1D44fAjCZW6bOXQxwoxtY6C DJSXcB3o98WcZ+Gf42C64qqOerV181X2rgR1U01z0yxW68W9mEoRUWCDnSkO6JymkHM2 CjQC4vGl4aEKeuj9Z+OpNZ69L36J6z65pLVTFYsbQLTT66NIAoFAgh/t3t4LtPTDMezb RnjpbjoMgCNmXl8WxFDLv2TvO7YFGunTvp7FfR5qdw2sYdET2umdOQJgi3YbzHpMeAzr Ex7VxEKYgJBu3XtnJtb/QXAQNcGnHNoZ+6tzWyGFFUCPErbtiNWp7ZkSIcT7bYq3nTdT LTlQ==
X-Gm-Message-State AOAM531Xv+a1QlYGh9gY+CyRe6ZBIzwkD9WLKanOdB7Q1VTM7qJBPDp2 UbrT77KaANH5kYMjLghGu3IifGbwgoW4BgOQSjUdPDJ6auI=
X-Google-Smtp-Source ABdhPJyu4DxbrsJSh7c1r0o80GqU2teuJC0jAUCnZU/hNLnLHj4nC+TAYU2A+WW35mnw2VV5xnMVHLC0Fqj5gi4k6ks=
X-Received by 2002:a67:7914:: with SMTP id u20mr14143964vsc.102.1592086664629; Sat, 13 Jun 2020 15:17:44 -0700 (PDT)
Received-SPF pass client-ip=2607:f8b0:4864:20::e2e; envelope-from=jamesdlin@gmail.com; helo=mail-vs1-xe2e.google.com
X-detected-operating-system by eggs.gnu.org: No matching host in p0f cache. That's all we know.
X-Spam_score_int -20
X-Spam_score -2.1
X-Spam_bar --
X-Spam_report (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action no action
X-Mailman-Approved-At Sat, 13 Jun 2020 20:04:16 -0400
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.23
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <https://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
X-Mailman-Original-Message-ID <CADPatTfW9=Hh2kuDXjs7L3XByUgS+zqUq=c62J583J0SOWO0Mw@mail.gmail.com>
Xref csiph.com gnu.bash.bug:16380

Show key headers only | View raw


Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
-fdebug-prefix-map=/build/bash-2bxm7h/bash-5.0=.
-fstack-protector-strong -Wformat -Werror=format-security -Wall
-Wno-parentheses -Wno-format-security
uname output: Linux debian 4.19.0-9-amd64 #1 SMP Debian
4.19.118-2+deb10u1 (2020-06-07) x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.0
Patch Level: 3
Release Status: release

Description:
If I modify the `HISTIGNORE` variable indirectly through a reference (e.g.
via `declare -n` or `local -n`), `HISTIGNORE` reflects the change, but the
change isn't honored.

Repeat-By:
$ HISTIGNORE=ls
$ history -c
$ ls
$ history
    1  history

`ls` is not listed, and `history` is, as expected.

$ declare -n historyref=HISTIGNORE
$ historyref=ls:history
$ echo $HISTIGNORE
ls:history
$ history -c
$ history
    1  history

`history` is still listed, despite being included by `HISTIGNORE`.

$ HISTIGNORE=$HISTIGNORE
$ history -c
$ history

Now nothing is printed, as expected.

- James

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Changes to HISTIGNORE are not honored when changed via a reference? "James D. Lin" <jamesdlin@gmail.com> - 2020-06-13 15:17 -0700

csiph-web