open Eio.Std (** Shell evaluation. This module provides the main evaluator for any shell. It requires users to provide a {! Types.State} module and a {! Types.Exec} module. *) module Make (S : Types.State) (E : Types.Exec) : sig type ctx (** The context of the evaluation *) module J : Types.Job with type process = E.process val make_ctx : ?interactive:bool -> ?subshell:bool -> ?local_state:(string * string) list -> ?background_jobs:J.t list -> ?last_background_process:string -> ?functions:(string * Sast.compound_command) list -> ?rdrs:Types.redirect list -> ?exit_handler:(unit -> unit) -> ?options:Built_ins.Options.t -> ?hash:Hash.t -> fs:Eio.Fs.dir_ty Eio.Path.t -> stdin:Eio_unix.source_ty r -> stdout:Eio_unix.sink_ty r -> async_switch:Switch.t -> program:string -> argv:string array -> signal_handler:((unit -> unit) -> unit) -> S.t -> E.t -> ctx val fs : ctx -> Eio.Fs.dir_ty Eio.Path.t (** The file system capability *) val state : ctx -> S.t (** Return the current state of the context. *) val sigint_set : ctx -> bool (** Has the signal SIGINT been set via a trap. *) val run : ctx Exit.t -> Ast.t -> ctx Exit.t * Ast.t list (** [run ctx ast] evaluates [ast] using the initial [ctx]. *) end