bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFE: new syntax for command substitution to keep trailing newlines?


From: Koichi Murase
Subject: Re: RFE: new syntax for command substitution to keep trailing newlines?
Date: Wed, 27 Jan 2021 13:57:05 +0800

2021年1月27日(水) 12:15 Clark Wang <dearvoid@gmail.com>:
> For example, we can use ${( ... )} which is now wrong syntax.

There was already a discussion to use ${ command } for no-fork command
substitutions as ksh does.

> From https://lists.gnu.org/archive/html/help-bash/2020-05/msg00077.html
>
> > According to Eli Schwartz, ksh supports `var=${ listcmd; }`. Sine ksh
> > can do it, this features should be doable in bash?
> [...]
> It's a low priority; if someone wants to take a shot at implementing it
> before I get to looking at it, I'd be happy to merge it in.

In ksh, ${( ... )} is a valid construct of this kind (though it seems
equivalent to $(...)), so your suggestion actually conflicts with this
possible future syntax.

--
Koichi



reply via email to

[Prev in Thread] Current Thread [Next in Thread]