     aliases = Enum.filter(load_aliases(), fn {name, _} -> String.contains?(name, pattern) end)
 
     {docs, max} = build_doc_list(modules, aliases)
-
     display_doc_list(docs, max)
   end
 

    Mix.raise("Unexpected arguments, expected \"mix help\" or \"mix help TASK\"")
  end

  defp print_doc(task, {doc, location}, opts) do
    if ansi_docs?(opts) do
      IO.ANSI.Docs.print_heading("mix #{task}", opts)
      IO.ANSI.Docs.print(doc, opts)
    else
      IO.puts("# mix #{task}\n")
      IO.puts(doc)
    end

    IO.puts("Location: #{location}")
  end

  # Loadpaths without checks because tasks may be defined in deps.


    cond do
      has_alias? and has_task? ->
        note = "There is also a task named \"#{task}\". The documentation is shown next."
        [alias_doc(aliases[task], note), task_doc(task)]

      has_alias? ->
        [alias_doc(aliases[task], nil)]

      true ->
        [task_doc(task)]
    end
  end

  defp alias_doc(task_name, note) do
    {"Alias for " <> inspect(task_name), "mix.exs", note}
  end

  defp task_doc(task) do
    module = Mix.Task.get!(task)
    doc = Mix.Task.moduledoc(module) || "There is no documentation for this task"
    {doc, where_is_file(module), nil}
  end
end
