contour-terminal / endo

7 stars 0 forks source link

support command substitution `$(cmd)` (and maybe `(cmd)`?) #12

Open christianparpart opened 6 months ago

christianparpart commented 6 months ago

Support command substitution.

I'm not sure we should support backtick-style command substitutions, because it's too error prone as a user.

The $(command) substitution should create a new AST node. command substitution can happen as a parameter, inside of a string literal (?) and the command's program name to be executed could be a command substitution itself, too.

examples

$(echo -n ls) -h -l -a
echo $(ps -ef)
echo "Hello, $(whoami)"