[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: hash -l with empty hash table prints to stdout
From: |
Lawrence Velázquez |
Subject: |
Re: hash -l with empty hash table prints to stdout |
Date: |
Wed, 17 Jun 2020 00:27:55 -0400 |
> On Jun 16, 2020, at 10:51 AM, Chet Ramey <chet.ramey@case.edu>
> wrote:
>
>> On 6/16/20 10:26 AM, Eli Schwartz wrote:
>>
>>> 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?
>
> No, not at all. What are you trying to debug?
>
> Maybe it would be better to remove the message entirely and only
> display it in compatibility mode.
The user-friendly way to view the table is by running `hash` without
arguments. It prints "hash table empty" as well, which makes sense in
that context. Given that, it makes sense to me to change `hash -l`,
which is expressly intended for scripting use, to output nothing when
the table is empty.
vq
Re: hash -l with empty hash table prints to stdout, Dale R. Worley, 2020/06/16