Shells in OCaml
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improved signal handling

Not perfect, but sigint-ing a process in interactive mode should at
least work now.

+8 -5
-2
dune-project
··· 36 36 (>= 0.37.0)) 37 37 (ppx_deriving_yojson 38 38 (>= 3.10.0)) 39 - (globlon 40 - (>= 0)) 41 39 (fpath 42 40 (>= 0.7.3)) 43 41 (eio_posix
-1
merry.opam
··· 20 20 "yojson" {= "2.2.2"} 21 21 "ppxlib" {>= "0.37.0"} 22 22 "ppx_deriving_yojson" {>= "3.10.0"} 23 - "globlon" {>= "0"} 24 23 "fpath" {>= "0.7.3"} 25 24 "eio_posix" {= "1.3"} 26 25 "eio" {= "1.3"}
+6 -1
src/lib/interactive.ml
··· 42 42 else if Sys.file_exists name then [ name ] 43 43 else [] 44 44 45 - let complete path = 45 + let complete ~home:_ path = 46 46 let rest, last_arg = 47 47 String.split_on_char ' ' path |> List.rev |> function 48 48 | [] -> ([], `None) ··· 108 108 match Astring.String.cut ~sep:command x with 109 109 | Some ("", rest) -> Some (rest, `Fg (`Hi `Magenta)) 110 110 | _ -> None) 111 + in 112 + let complete = 113 + match S.lookup (Exit.value ctx |> Eval.state) ~param:"HOME" with 114 + | Some home -> complete ~home 115 + | None -> complete ~home:(Eunix.find_env "HOME") 111 116 in 112 117 match 113 118 Bruit.bruit ~hint
+2 -1
src/lib/posix/exec.ml
··· 119 119 let await t = 120 120 match Eio.Promise.await @@ Process.exit_status t with 121 121 | Unix.WEXITED i -> `Exited i 122 - | Unix.WSIGNALED i -> `Signaled i 122 + | Unix.WSIGNALED i -> `Signaled (128 + Sys.signal_to_int i) 123 123 | Unix.WSTOPPED _ -> assert false 124 124 125 125 let signal = Process.signal ··· 261 261 262 262 let run ~mode ?delay_reap _ ?stdin ?stdout ?stderr ?(fds = []) 263 263 ?(fork_actions = []) ~pgid ~cwd ~pipe ?env ?executable args = 264 + Sys.set_signal Sys.sigint Sys.Signal_default; 264 265 with_close_list @@ fun to_close -> 265 266 let check_fd n = function 266 267 | Merry.Types.Parent_redirect (m, _, _) -> Int.equal n m