Shells in OCaml
3
fork

Configure Feed

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

Fixup environment setting

+11 -1
+11 -1
src/lib/eval.ml
··· 198 198 199 199 let apply_pair (a, b) f = f a b 200 200 let ( ||> ) = apply_pair 201 - let get_env ?(extra = []) () = Eunix.env () @ extra 201 + 202 + let get_env ?(extra = []) () = 203 + let env = Eunix.env () in 204 + let rec loop = function 205 + | [] -> [] 206 + | (k, v) :: rest -> ( 207 + match List.assoc_opt k extra with 208 + | Some v' -> (k, v') :: loop rest 209 + | None -> (k, v) :: loop rest) 210 + in 211 + loop env 202 212 203 213 let rec execute_commands initial_ctx local_switch p = 204 214 let rec loop (exit_ctx : ctx Exit.t)