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


Groups > gnu.bash.bug > #16388

Re: hash -l with empty hash table prints to stdout

Path csiph.com!xmission!news.snarked.org!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail
From Eli Schwartz <eschwartz@archlinux.org>
Newsgroups gnu.bash.bug
Subject Re: hash -l with empty hash table prints to stdout
Date Tue, 16 Jun 2020 10:26:55 -0400
Lines 68
Approved bug-bash@gnu.org
Message-ID <mailman.1981.1592317632.2541.bug-bash@gnu.org> (permalink)
References <20200615204717.GB28118@jar> <bd77214b-2690-f5de-a814-108e5be8b6f1@case.edu> <447bbb87-ce9a-e038-5a00-68646f9771c4@archlinux.org> <067bf5a9-72ba-f6f6-a170-d1ebaa54919b@case.edu> <69a0b336-4f2e-3c9f-cacf-79358ed33bf4@archlinux.org>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SrLGS0V4EHh4CigcpWxyNyP6CebqUgmGb"
X-Trace usenet.stanford.edu 1592317633 19305 209.51.188.17 (16 Jun 2020 14:27:13 GMT)
X-Complaints-To action@cs.stanford.edu
To chet.ramey@case.edu, bug-bash@gnu.org
Envelope-to bug-bash@gnu.org
X-Spam-BL-Results
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/simple; d=archlinux.org; s=orion; t=1592317618; bh=471D6e4WeQNutccfqC+DefCzChaIPR/Jn6l/07ZZypw=; h=Subject:To:References:From:Date:In-Reply-To; b=XHCpXXKtPwApjWGz0Dm4B+aaPQvvHkSm4Ec18OHG2Yc8oOpTjJU52Yo+2sR/4ZRc9 Rxp7ZiFh7GeUO4yUR4R+OYLE9IFm46z61Hrv24WcMv8UUta86Vj4L0VSkbvdg65lsS Hc2u1/PTR9YmrKtVr7PHJ2C6f8de3f2Hxk8a5skBtOuRpD0tKY55jSuMoQOGVf5/f0 yYJuftexSYM4UJEKSKhaIFQOYMPldUa7X/P+UZ4pISGbifer0GOJFqKHJtAAHaOtjl 1uP0pDOKwRh9k4ERviGjJI6tRaV/U09FnQQahlNRJW6/6ri2kLcXXmJTc9OPrVS9po hNVXbAB2PMbyUn/ne8ZsvnEFOB0Irf569FgbkxLp4+yMoX3OeXckl1z0Pu2FVUQEMx gvCziwCTBBWwWCncJpiC5vTba3Nu+gyleZL5Ys0RyY0xQaLKFQmxS38JGBc/zJJ1D+ jg3IDfAuB4gpSl1MeesoZj47u3W+lTKACqGJJq2cGAvPafyTX19PJqzL2Bzt8/DvOy f3Qt4r9myxuMCS5EptV6U92lIau4y1yOA3BTMCwb+X5o7QsTM9Pxb/iAy65YJKbKV5 CXY8bY1DBYQWGdCkrl1PR9775ftufeWyPtVZKHNK+uU8lT3S+l23DQ5bpq7/++jeZK mliWa1F3tFUeq0zFcknsCZE4=
X-Clacks-Overhead GNU Terry Pratchett
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0
In-Reply-To <067bf5a9-72ba-f6f6-a170-d1ebaa54919b@case.edu>
Received-SPF pass client-ip=88.198.91.70; envelope-from=eschwartz@archlinux.org; helo=orion.archlinux.org
X-detected-operating-system by eggs.gnu.org: First seen = 2020/06/16 10:27:03
X-ACL-Warn Detected OS = Linux 2.2.x-3.x [generic] [fuzzy]
X-Spam_score_int -53
X-Spam_score -5.4
X-Spam_bar -----
X-Spam_report (-5.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action no action
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 <69a0b336-4f2e-3c9f-cacf-79358ed33bf4@archlinux.org>
X-Mailman-Original-References <20200615204717.GB28118@jar> <bd77214b-2690-f5de-a814-108e5be8b6f1@case.edu> <447bbb87-ce9a-e038-5a00-68646f9771c4@archlinux.org> <067bf5a9-72ba-f6f6-a170-d1ebaa54919b@case.edu>
Xref csiph.com gnu.bash.bug:16388

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 6/16/20 9:56 AM, Chet Ramey wrote:
> It's not a warning; there's nothing to warn about. An empty hash table is
> not an exceptional condition. It's simply informational.

Then would you say it is debug info?

Why is stderr not a good place for this? hash -l documents that its
output may be reused as input, which assumption breaks down if the hash
table is empty.

If "send the non-eval'able diagnostic output to stderr, separate from
the eval'able output stream" isn't a convincing argument to you, then
perhaps it could be prefixed with a "#" such that eval'ing it would skip
that line?

-- 
Eli Schwartz
Arch Linux Bug Wrangler and Trusted User

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


Thread

Re: hash -l with empty hash table prints to stdout Eli Schwartz <eschwartz@archlinux.org> - 2020-06-16 10:26 -0400

csiph-web