guile-ocaml
guile-ocaml copied to clipboard
Manually specify arguments to `scm_shell`
Currently Guile.shell () passes Sys.argv to the C scm_shell to start a Guile shell.
This makes it hard to start a Guile shell from OCaml when using custom command line argument handling (e.g. with Cmdliner).
It should be possible to manually specify the arguments that are passed to scm_shell. I.e. the type signature of Guile.shell should be:
shell : string array -> unit
or
shell : ?argv : string array -> unit -> unit
Ah, sorry missed this comment earlier.
Yes, indeed, that would be possible.
When I get the chance, I'll update the library to do as you suggest, or feel free to send a PR in the meanwhile.