guile-ocaml icon indicating copy to clipboard operation
guile-ocaml copied to clipboard

Manually specify arguments to `scm_shell`

Open pukkamustard opened this issue 3 years ago • 1 comments

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

pukkamustard avatar Sep 09 '22 15:09 pukkamustard

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.

kiranandcode avatar Sep 26 '22 09:09 kiranandcode