<sleepydog>
anyone got an example of a Cmdliner.Arg.t that accumulates repeated values of the same flag? The vflag_all examples show how to choose between different flags
Haudegen has quit [Quit: Bin weg.]
<sleepydog>
I'm trying to have a command line like awk's -v flag, e.g `mycommand -v var1=foo -v var2=bar ...`
szkl has quit [Quit: Connection closed for inactivity]
toastal has quit [Ping timeout: 272 seconds]
toastal has joined #ocaml
Haudegen has joined #ocaml
zenmov has joined #ocaml
zenmov_ has joined #ocaml
zenmov has quit [Ping timeout: 252 seconds]
zenmov_ has quit [Ping timeout: 244 seconds]
gentauro has quit [Read error: Connection reset by peer]
gentauro has joined #ocaml
zenmov has joined #ocaml
zenmov_ has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
zenmov has quit [Changing host]
zenmov has joined #ocaml
zenmov_ has quit [Quit: leaving]
zenmov has quit [Quit: leaving]
zenmov has joined #ocaml
zenmov has quit [Changing host]
zenmov has joined #ocaml
olle has quit [Ping timeout: 244 seconds]
zenmov has quit [Quit: leaving]
zenmov has joined #ocaml
zenmov has quit [Changing host]
zenmov has joined #ocaml
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
steenuil has quit [Remote host closed the connection]
steenuil has joined #ocaml
<discocaml>
<lima.leonardo> Hi. I am having some trouble with Eio and could use some help. I am trying to specify three fibers: one that executes an external process; one that writes to the stdin of the external process; and one that reads from the stdout of the external process, as follows:
<discocaml>
<lima.leonardo> ```ocaml
<discocaml>
<lima.leonardo> let exec (stream: in_channel) =
<discocaml>
<lima.leonardo> let ( / ) = Eio.Path.( / ) in
<discocaml>
<lima.leonardo> Eio_main.run @@ fun env ->
<discocaml>
<lima.leonardo> let proc_mgr = Eio.Stdenv.process_mgr env in
<discocaml>
<lima.leonardo> let domain_mgr = Eio.Stdenv.domain_mgr env in
<discocaml>
<lima.leonardo> Switch.run (fun sw ->
<discocaml>
<lima.leonardo> let w_source, w_sink = Eio.Process.pipe ~sw proc_mgr in
<discocaml>
<lima.leonardo> let r_source, r_sink = Eio.Process.pipe ~sw proc_mgr in
<discocaml>
<lima.leonardo> let r_buf = Eio.Buf_read.of_flow r_source ~initial_size:100 ~max_size:1_000_000 in
<discocaml>
<lima.leonardo> try
<discocaml>
<lima.leonardo> Fiber.all
<discocaml>
<lima.leonardo> [
<discocaml>
<lima.leonardo> (fun () ->
<discocaml>
<lima.leonardo> let _ = Eio.Process.spawn ~sw ~stdin:w_source ~stdout:r_sink ~stderr:r_sink
<discocaml>
<lima.leonardo> proc_mgr [] |> Eio.Process.await in ());