Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
christianparpart opened this issue Dec 18, 2023 · 0 comments
Open

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

christianparpart opened this issue Dec 18, 2023 · 0 comments
Labels
enhancement New feature or request part:language Shell Language and Semantics

Comments

@christianparpart
Copy link
Member

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)"
@christianparpart christianparpart added part:language Shell Language and Semantics enhancement New feature or request labels Dec 18, 2023
@christianparpart christianparpart changed the title support command substitution $(cmd) support command substitution $(cmd) (and maybe (cmd) Dec 18, 2023
@christianparpart christianparpart changed the title support command substitution $(cmd) (and maybe (cmd) support command substitution $(cmd) (and maybe (cmd)?) Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request part:language Shell Language and Semantics
Projects
None yet
Development

No branches or pull requests

1 participant