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

Allow extra command line arguments #297 #298

Merged

Conversation

FlashSheridan
Copy link
Contributor

  • Pass, per the maintainer’s suggestion, extra arguments to the child subprocess, so that they can be seen in the REPL.
  • Add, for Rust newbies like me, a new command-line option to allow more command-line arguments:

--extra-args <extra-args>... Extra arguments; ignored, but show up in std::env::args()

I am, by hypothesis, a Rust newbie, so review may be in order.

Testing

  • EVCXR_TMPDIR=$HOME/tmp/e1 cargo test -- --test-threads 1 passed on MacOS 12.6.2 21G320 on M1 Max, with the same two crash dialogs I got from main.
  • target/debug/evcxr --opt 2 --edit-mode emacs --extra-args \\--foo bar baz gave:

>> std::env::args()

Args { inner: ["/Users/flash/Documents/Code/external_code/evcxr/target/debug/evcxr", "target/debug/evcxr", "--opt", "2", "--edit-mode", "emacs", "--extra-args", "\\--foo", "bar", "baz"] }

“Allow extra command line arguments” evcxr#297
--extra-args <extra-args>...    Extra arguments; ignored, but show up in std::env::args()
@davidlattimore davidlattimore merged commit 02b4698 into evcxr:main May 26, 2023
1 check failed
@davidlattimore
Copy link
Collaborator

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.

None yet

2 participants