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

2020-06-16 Thread Lawrence Velázquez
> On Jun 16, 2020, at 10:51 AM, Chet Ramey > 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. >> >> Th

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

2020-06-16 Thread Eli Schwartz
On 6/16/20 11:07 PM, bel...@web.de wrote: > `shopt' doesn't appear to have an option for giving output re-usable as > input (?). `shopt -p`, surely. Or `shopt -o -p`. -- Eli Schwartz Arch Linux Bug Wrangler and Trusted User signature.asc Description: OpenPGP digital signature

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

2020-06-16 Thread beluro
> You might want to temporarily enable posix mode, which suppresses the > message. Good to know. For scripts intended to be sourced, this would include testing for posix mode first, then enable posix mode, run `hash -l', then maybe re- disable it, but ok. Maybe adopt the POSIX-mode behaviour? Doe

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

2020-06-16 Thread Eli Schwartz
On 6/16/20 10:13 PM, Dale R. Worley wrote: > What a weird problem! Yes, "hash -l" should produce output that can be > read by bash. But sending the "bash: hash table empty" message to > stderr put you in the situation where "hash -l >file" doesn't really > leave the output of "hash -l" in "file".

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

2020-06-16 Thread Dale R. Worley
What a weird problem! Yes, "hash -l" should produce output that can be read by bash. But sending the "bash: hash table empty" message to stderr put you in the situation where "hash -l >file" doesn't really leave the output of "hash -l" in "file". Maybe you could make the empty message be a comme

Re: bash doc: misspelling "abd" -> "and"

2020-06-16 Thread Chet Ramey
On 6/16/20 2:49 PM, Brian Dyson wrote: > Minor correct in Bash documentation. The word "and" is misspelled as "abd": Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@cas

bash doc: misspelling "abd" -> "and"

2020-06-16 Thread Brian Dyson
Minor correct in Bash documentation. The word "and" is misspelled as "abd": diff --git a/doc/bash.0 b/doc/bash.0 index a062b8ac..b545c98f 100644 --- a/doc/bash.0 +++ b/doc/bash.0 @@ -2465,7 +2465,7 @@ ARITHMETIC EVALUATION CONDITIONAL EXPRESSIONS Conditional expressions are used by the [[

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

2020-06-16 Thread Chet Ramey
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

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

2020-06-16 Thread Chet Ramey
On 6/16/20 9:46 AM, Eli Schwartz wrote: > On 6/16/20 9:30 AM, Chet Ramey wrote: >> On 6/15/20 4:47 PM, bel...@web.de wrote: >> >>> Bash Version: 5.0 >>> Patch Level: 3 >>> Release Status: release >>> >>> Description: >> >>> `hash -l' is supposed to generate output that is reusable as input >>>

Re: errata in bash manual

2020-06-16 Thread Chet Ramey
On 6/16/20 8:34 AM, 홍홍 wrote: > In this section > https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion > > (substring expansion) > > If offset is 0, and the positional parameters are used, $@

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

2020-06-16 Thread Eli Schwartz
On 6/16/20 9:30 AM, Chet Ramey wrote: > On 6/15/20 4:47 PM, bel...@web.de wrote: > >> Bash Version: 5.0 >> Patch Level: 3 >> Release Status: release >> >> Description: > >> `hash -l' is supposed to generate output that is reusable as input >> (`help hash' says so, at least). In case the

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

2020-06-16 Thread Chet Ramey
On 6/15/20 4:47 PM, bel...@web.de wrote: > Bash Version: 5.0 > Patch Level: 3 > Release Status: release > > Description: > `hash -l' is supposed to generate output that is reusable as input > (`help hash' says so, at least). In case the hash table is empty, a > string not re-us

errata in bash manual

2020-06-16 Thread 홍홍
In this section https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion (substring expansion) If offset is 0, and the positional parameters are used, $@ is prefixed to the list. should be If o