   defp ensure_loaded(mod),
     do: Code.ensure_compiled(mod)
 
+  defp starts_with?(_string, ""),  do: true
+  defp starts_with?(string, hint), do: String.starts_with?(string, hint)
+
   ## Ad-hoc conversions
 
   defp to_entries(%{kind: :module, name: name}) do

  defp match_aliases(hint) do
    for {alias, _mod} <- env_aliases(),
        [name] = Module.split(alias),
        String.starts_with?(name, hint) do
      %{kind: :module, type: :alias, name: name}
    end
  end


        for {fun, arities} <- list,
            name = Atom.to_string(fun),
            starts_with?(name, hint) do
          %{kind: :function, name: name, arities: arities}
        end |> :lists.sort()

