···3030 type merry = [ `Async ]
3131 type option = [ posix | merry ]
32323333+ let posix_to_letter = function
3434+ | `Noclobber -> "C"
3535+ | _ -> ""
3636+3737+ let to_letters t =
3838+ let nc = if t.noclobber then posix_to_letter `Noclobber else "" in
3939+ nc ^ ""
4040+3341 let update t options =
3442 List.fold_left
3543 (fun d -> function
+2
src/lib/built_ins.mli
···77 async : bool;
88 }
991010+ val to_letters : t -> string
1111+1012 type posix = [ `Noclobber | `Pipefail | `Noglob | `Nounset ]
1113 type merry = [ `Async ]
1214 type option = [ posix | merry ]
-2
src/lib/eunix.ml
···2525 let shell_pid = Unix.getpid () in
2626 Fun.protect
2727 ~finally:(fun () ->
2828- Fmt.pr "Back to the shell\n%!";
2928 let _ : int = tcsetpgrp 0 shell_pid in
3029 ())
3130 (fun () ->
3232- Fmt.pr "Delegating...\n%!";
3331 match tcsetpgrp (Obj.magic Unix.stdin : int) pgid with
3432 | 0 -> fn ()
3533 | n -> Fmt.failwith "tcsetpgrp: %i" n)
+5
src/lib/eval.ml
···604604 expand
605605 ([ Ast.WordName ctx.last_background_process ] :: acc)
606606 ctx rest
607607+ | Ast.VariableAtom ("-", NoAttribute) ->
608608+ let i = if ctx.interactive then "i" else "" in
609609+ expand
610610+ ([ Ast.WordName (Built_ins.Options.to_letters ctx.options ^ i) ] :: acc)
611611+ ctx rest
607612 | Ast.VariableAtom (n, NoAttribute)
608613 when Option.is_some (int_of_string_opt n) -> (
609614 let n = int_of_string n in