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
[SR-5860] Support "swift -e" for immediate execution #48430
Comments
The original Apple bug asked for |
This is a little more than a starter bug, but not too much: 1. Add a new command-line option in Options.td. |
Ah, what the heck. I'll tag it anyway. Just let it be known that there might be easier ones. :-) |
Comment by Keith Ermel (JIRA) Think I'll give this a try. @belkadan the instructions above are pretty clear (thanks!), but I may need a little guidance along the way, some of the details are a little fuzzy right now. This is the first issue I'll be working on so bear with me, I'm brand new to the codebase, process, etc. so I have plenty to learn! |
Sounds good! Feel free to tag me in an eventual pull request (even if it's still WIP), or to send emails to the swift-dev mailing list to ask questions. |
I started looking into this one and could use some advice. I'm trying to follow the recommendations above and have the argument getting here Lines 1814 to 1829 in ae6645d
Any advice would be appreciated! |
I've gone ahead with the approach I mentioned above, I'd love feedback on the PR! #18303 |
Fixed with #61171 |
Additional Detail from JIRA
md5: faa7261c29c8eaec2f0913a8952f8e77
Issue Description:
Currently
swift
(the command) always reads a file when you want to run a script; if you want to pass the code on the command line, you have to do it through STDIN:We can make this a little nicer by supporting
-e
, like Ruby and Perl:The text was updated successfully, but these errors were encountered: