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

Fix spread operators & redirections #143

Merged
merged 4 commits into from
Nov 17, 2024
Merged

Fix spread operators & redirections #143

merged 4 commits into from
Nov 17, 2024

Conversation

blindFS
Copy link
Contributor

@blindFS blindFS commented Nov 17, 2024

This PR should fix #98, as well as several easy problems mentioned in #142.

I think I should keep each PR focused for better traceability, so the trickier issues related to identifier and parameters are left for later.

Command

  • - val_interpolated as the external command head
    • example: ^$"($cmd)"

Redirection

  • - append ops, example 1 o>> foo
  • - values redirection, example 1 + 1 o> foo
  • - redirect pipes should be single token, example cmd1 e>| cmd2

Parameters/command args

  • - spread types

Misc

  • - variable as cell_path: $foo.$bar.$baz, it turns out $bar is treated as string instead.

Changes made to the existing test cases

  • unquoted node in decl_use renamed to val_string to align with stmt_source
  • cases that should fail now simply tagged with :error since we generally don't care where the error occurs

@fdncred fdncred merged commit 45f9e51 into nushell:main Nov 17, 2024
3 checks passed
@fdncred
Copy link
Collaborator

fdncred commented Nov 17, 2024

Nice work, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the spread operator
2 participants