[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
- Re: RFE: new syntax for command substitution to keep trailing newlines?, (continued)
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Chet Ramey, 2021/01/27
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Alex fxmbsw7 Ratchev, 2021/01/29
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Chet Ramey, 2021/01/29
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Alex fxmbsw7 Ratchev, 2021/01/29
- Message not available
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Alex fxmbsw7 Ratchev, 2021/01/30
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Chet Ramey, 2021/01/30
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Léa Gris, 2021/01/27
- Re: RFE: new syntax for command substitution to keep trailing newlines?, Chet Ramey, 2021/01/27
- Re: RFE: new syntax for command substitution to keep trailing newlines?, pepa65, 2021/01/27
Re: RFE: new syntax for command substitution to keep trailing newlines?, Koichi Murase, 2021/01/27
- Re: RFE: new syntax for command substitution to keep trailing newlines?,
pepa65 <=
Re: RFE: new syntax for command substitution to keep trailing newlines?, Clark Wang, 2021/01/27