Stripping newlines from subshell expansion
Created by: huntergoldstein
Current Behavior
Grabbing the output of a command from an unquoted subshell expansion will strip the newlines from the output. For example:
$ ls -l
total 0
-rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 bar
-rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 baz
-rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 foo
$ let var = $(ls -l)
$ let
...
var = total 0 -rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 bar -rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 baz -rw-r--r-- 1 hunter hunter 0 Jul 13 12:26 foo
...
Proposal
I believe it is clearer if sub-shell expansion does not modify the output of the shell (some discussion in #405). Other thoughts?