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: pepa65
Subject: Re: RFE: new syntax for command substitution to keep trailing newlines?
Date: Wed, 27 Jan 2021 13:55:52 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 27/01/2021 12.57, Koichi Murase wrote:
> There was already a discussion to use ${ command } for no-fork command
> substitutions as ksh does.

I would find that syntax very confusing, as ${var} is used to access
variables, so then only the starting space (and the ending semicolon)
would distinguish this as a command instead of a variable.

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

Anything using ( ) would suggest something involving a subshell. Maybe
$[{ ... }] or even ${{ ... }} would be clearer?

Peter



reply via email to

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