let to_shell: type a. a t -> string =
function
| Int i -> sprintf "%d" i
| String s ->
with_buffer begin fun str ->
String.iter s ~f:(fun c ->
Char.code c |> sprintf "%03o" |> str
);
end |> fst
| Bool true -> "true"
| Bool false -> "false"