history builtin with no HISTFILE

2023-07-27 Thread Grisha Levit
If the `history' builtin is used with no filename argument and the HISTFILE variable is unset, the Readline default history file ~/.history is used. $ rm -f ~/.history $ bash -c 'history -s foo; history -w' $ cat ~/.history foo The help text states: If FILENAME is given, it is used as the hi

Re: comments inside command subst are handled inconsistently

2023-07-27 Thread Dale R. Worley
Denys Vlasenko writes: > Try these two commands: > > $ echo "Date: `date #comment`" > Date: Thu Jul 27 10:28:13 CEST 2023 > > $ echo "Date: $(date #comment)" >> )" > Date: Thu Jul 27 10:27:58 CEST 2023 > > As you see, #comment is handled differently in `` and $(). > I think the handling in `` make

Re: Tilde (~) in bash(1) is typeset incorrectly as Unicode character

2023-07-27 Thread Chet Ramey
On 7/26/23 11:35 AM, G. Branden Robinson wrote: I know a little about groff. Your advice is fine for man pages that target only groff[1] and/or mandoc[2], but not Heirloom Doctools troff,[3] neatroff[4] or Plan 9 troff (in its original form or as maintained in Plan 9 from User Space[5]), and no

Re: Tilde (~) in bash(1) is typeset incorrectly as Unicode character

2023-07-27 Thread G. Branden Robinson
Hi Chet, At 2023-07-27T11:54:19-0400, Chet Ramey wrote: > On 7/26/23 11:35 AM, G. Branden Robinson wrote: > > Many projects don't need to worry about such extreme portability in > > their man pages, but GNU Bash arguably does. (I'm open to > > correction.) > > It's an ongoing struggle. There are

Re: built-in printf returns success when integer is out of range

2023-07-27 Thread Chet Ramey
On 7/26/23 4:18 PM, tho...@habets.se wrote: Bash Version: 5.2 Patch Level: 15 Release Status: release Description: printf '%d\n' 111 && echo success prints "success" /usr/bin/printf does not, but instead returns EXIT_FAILURE (1). The bash pri

comments inside command subst are handled inconsistently

2023-07-27 Thread Denys Vlasenko
Try these two commands: $ echo "Date: `date #comment`" Date: Thu Jul 27 10:28:13 CEST 2023 $ echo "Date: $(date #comment)" )" Date: Thu Jul 27 10:27:58 CEST 2023 As you see, #comment is handled differently in `` and $(). I think the handling in `` makes more sense.