mirage / awa-ssh

Purely functional SSH library in ocaml.
ISC License
104 stars 12 forks source link

Add two events Pty/Set_env/Start_shell into the server #53

Closed dinosaure closed 1 year ago

dinosaure commented 1 year ago

This PR change a bit the interface of awa-mirage and give the ability to handle new events:

hannesm commented 1 year ago

LGTM, minor nits in the comments.

dinosaure commented 1 year ago

I decided to upgrade the lwt layer with the support of the shell in a different way than the mirage layer via a callback for set_env and set_window (when we got such event from the server) and an optional ?cmd argument for the exec_callback. It breaks the API too but less than the mirage layer.

dinosaure commented 1 year ago

I think it's ready to merge. A question remains about an homogeneized interface between awa-lwt and awa-mirage but I would like to have a feedback on that before. /cc @hannesm @reynir (@palainp already updated sshfs accordind to this PR).

palainp commented 1 year ago

(@palainp already updated sshfs accordind to this PR).

Unfortunately not yet, but I will :)

A question remains about an homogeneized interface between awa-lwt and awa-mirage but I would like to have a feedback on that before.

I prefer the awa-mirage style, but that's just a personal view, and I agree that a similar interface should be beneficial.

hannesm commented 1 year ago

I'm fine with this PR. I did not use the server API (yet).