···164164 | _ :: lines -> find_subs lines
165165 | [] -> []
166166 in
167167- let exec = strf "%s --__complete %s --__complete=" tool cmd in
167167+ let exec =
168168+ strf "%s --__complete %s --__complete=" (Filename.quote tool) cmd
169169+ in
168170 let comps = exec_stdout exec |> error_to_failure in
169171 let comps = String.split_on_char '\n' comps in
170172 match comps with
···184186 with Failure e -> Error e
185187186188let get_tool_command_man tool ~name cmd =
189189+ let tool = Filename.quote tool in
187190 let exec = if cmd = "" then tool else String.concat " " [tool; cmd] in
188191 let man_basename =
189192 let exec = if cmd = "" then name else String.concat " " [name; cmd] in