     port = Port.open({:spawn, shell_command(command)},
                      [:stream, :binary, :exit_status, :hide, :use_stdio, {:env, env} | args])
 
-    {acc, callback} = Collectable.into(collectable)
-    do_cmd(port, acc, callback)
+    port_read(port, acc, callback)
   end
 
-  defp do_cmd(port, acc, callback) do
+  defp port_read(port, acc, callback) do
     receive do
       {^port, {:data, data}} ->
-        do_cmd(port, callback.(acc, {:cont, data}), callback)
+        port_read(port, callback.(acc, {:cont, data}), callback)
       {^port, {:exit_status, status}} ->
         callback.(acc, :done)
         status

  end

  @doc false
  def cmd(command, options, callback) when is_function(callback, 1) do
    callback =
      if Keyword.get(options, :quiet, false) do

        callback
      end

    fun = fn
      _, {:cont, data} -> callback.(data)
      _, _ -> :ok
    end

    cmd(command, options, :ok, fun)
  end

  def cmd(command, callback) when is_function(callback, 1) do
    cmd(command, [], callback)
  end
