let rec to_shell_commands = function | `Shell_command s -> [s] | `Exec sl -> [fmt "%s" (List.map sl ~f:Filename.quote |> String.concat ~sep:" ")] | `And l -> List.concat_map l ~f:to_shell_commands