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

consider IR for commands #714

Open
andychu opened this issue Apr 17, 2020 · 1 comment
Open

consider IR for commands #714

andychu opened this issue Apr 17, 2020 · 1 comment

Comments

@andychu
Copy link
Contributor

andychu commented Apr 17, 2020

analogous to #604 -- words and ${}

  • ls ; doesn't need to be a command.Sentence. That is only for translation/ linters / formatters.
  • ! ls should not be a "pipeline" -- that's an artifact of the grammar

IR for redirects:

  • ls |& wc -l could be rewritten to primitive redirects
    • I think it's ls 2>&1 | wc -l
  • myprog &> foo.txt
    • I think it's myprog >foo.txt 2>&1
  • Oil style redirects with parse_amp: Implement shopt -s parse_amp  #832

Already mutated:

  • do_fork for the process optimization

Special case with __cat: $(< file)


This is mainly for simplifying the code, although it should also speed things up a little.

@andychu
Copy link
Contributor Author

andychu commented May 15, 2021

Very similar to #761 , might be a dupe

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

No branches or pull requests

1 participant