[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parsing command substitution inside parameter expansion in interacti
From: |
Chet Ramey |
Subject: |
Re: parsing command substitution inside parameter expansion in interactive shell |
Date: |
Mon, 20 Mar 2023 16:58:57 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
On 3/19/23 9:58 PM, Grisha Levit wrote:
If a command substitution inside a parameter expansion has a command
followed by a newline, bash prints an error message (though the
command is parsed and saved in the history list correctly):
Thanks for the report. This is the same thing as
https://lists.gnu.org/archive/html/bug-bash/2021-06/msg00115.html
with the command substitution being embedded in the parameter expansion.
If the command substitution starts with a newline, no error is printed
but the command is _not_ saved correctly to the history list (a
semicolon is inserted at the start):
Thanks, it's an easy fix to preserve the newline here.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/