On 2025-04-07  22:34, Chet Ramey wrote:
> On 4/4/25 4:18 PM, Jens Schmidt wrote:
> 
>> [bashbug output manually adapted to real version ...]
>> Bash Version: 5.3
>> Commit: a6767763de5e7859107711b166a64a9e4a77a8ae
>> Release Status: compiled from recent devel branch
>>
>>
>> Description:
>>    Bash skips empty lines when reading history file in multiline mode.
> 
> This is a problem even if lithist isn't set -- it's not uncommon to have
> blank lines in here-documents.

Right, the lithist option has nothing to do with this problem, I think
that was more of a left-over from writing up the test case than anything
else.

> But do you really think people want blank history entries even with lithist
> set?

No.  Also the leading and trailing blank lines in my example were
there just to ensure that my patch works also in these edge cases.
In reality Bash does not really need to preserve these, IMO.

> How about history processing blank lines as part of the command after
> it reads the first non-blank line?

Sounds like a good compromise between complexity of implementation
and blank line preservance in the result.

Thanks!


Reply via email to