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
Patch to add "Rest" option to ocaml toplevel #4671
Comments
Comment author: @diml Do you have a use case for this? If all libraries see the same command line, it might not be clear how to dispatch arguments. Another way would be to allow libraries to register new command line arguments for the toplevel. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
I still think this would be useful for scripting in OCaml. |
Note: there already is a different mechanism for this when calling ocaml with a "script file": only the arguments after the script file will be part of
Given this facility, I am a bit hesitant to add a new mechanism as suggested in this feature wish. |
Yes, the feature wish is about interactive use, as far as I understand; scripting is already OK. |
Maybe we could follow the suggestion of allowing |
That sounds very nice. |
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc. |
Original bug ID: 4671
Reporter: mwahab
Assigned to: @diml
Status: feedback (set by @diml on 2017-01-05T13:40:32Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.11.0+beta
Category: toplevel
Tags: patch
Monitored by: @whitequark @glondu
Bug description
It would be useful to be able to pass command line options to
libraries linked into the ocaml toplevel. Attached is a patch to add
the Arg.Rest option '--' to the ocaml toplevel and function
Toploop.get_cli_strings to get the strings after the -- option.
Additional information
Example usage:
Toploop.get_cli_strings();;
Patch is against CVS head
File attachments
The text was updated successfully, but these errors were encountered: