anchor.diff:  %% @doc Create a shell quoted command string from a list of arguments.
   cmd_string(Argv) ->
       string:join([shell_quote(X) || X <- Argv], " ").
  +
  +%% @spec cmd_status([string()]) -> {ExitStatus::integer(), Stdout::binary()}
  +%% @doc Accumulate the output and exit status from the given application, will be
  +%%      spawned with cmd_port/2.
  +cmd_status(Argv) ->
  +    Port = cmd_port(Argv, [exit_status, stderr_to_stdout,
  +                           use_stdio, binary]),
  +    cmd_loop(Port, []).
  +
  +%% @spec cmd_loop(port(), list()) -> {ExitStatus::integer(), Stdout::binary()}
  +%% @doc Accumulate the output and exit status from a port.
  +cmd_loop(Port, Acc) ->
  +    receive
  +        {Port, {exit_status, Status}} ->
  +            {Status, iolist_to_binary(lists:reverse(Acc))};
  +        {Port, {data, Data}} ->
  +            cmd_loop(Port, [Data | Acc])
  +    end.
   
   %% @spec join([string()], Separator) -> string()
   %% @doc Deprecated, use string:join/2.
  
positive.code:        Res).
  
  cmd_test() ->
      "$bling$ `word`!\n" = cmd(["echo", "$bling$ `word`!"]),
      ok.
  
  cmd_string_test() ->
      "\"echo\" \"\\$bling\\$ \\`word\\`!\"" = cmd_string(["echo", "$bling$ `word`!"]),
      ok.
  
  parse_header_test() ->
      ?assertEqual(
  
negative.code:     ok.
  
  shell_quote_test() ->
      ?assertEqual(
         "\"foo \\$bar\\\"\\`' baz\"",
         shell_quote("foo $bar\"`' baz")),
      ok.
  
  cmd_port_test_spool(Port, Acc) ->
  