[Proposal] Mix aliases docs

52 views
Skip to first unread message

Panagiotis Nezis

unread,
Nov 2, 2023, 7:45:02 AM11/2/23
to elixir-l...@googlegroups.com
Big projects tend to have multiple aliases. It would be nice, especially for newcomers, to be able to document the project's aliases. This is especially useful for aliases expecting CLI arguments.

An option could be to add an `aliases_docs` project config setting where you could be able to (optionally) define a shortdoc and (maybe) a detailed doc for an alias. Something like:

    aliases_docs: [
        lint: [
           shordoc: "lints the project",
           doc: """
           Some detailed docs here
           """ 
        ]
    ]

Would be happy to open a PR if you agree with this proposal.

José Valim

unread,
Nov 2, 2023, 7:49:43 AM11/2/23
to elixir-l...@googlegroups.com
Before going down this road, I would first like to add "mix help --aliases" and we could show the alias definition (i.e. what it invokes). I think it would already be a massive improvement to the UX. Would you like to give this a try?

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAPxxbtguAJjSSHxqP6XbpJXbyNAm_dQpXu5ZhzdMiU52eM-4hg%40mail.gmail.com.

Panagiotis Nezis

unread,
Nov 2, 2023, 8:01:34 AM11/2/23
to elixir-lang-core
What if an alias is a function?

José Valim

unread,
Nov 2, 2023, 8:04:05 AM11/2/23
to elixir-l...@googlegroups.com
We will inspect the function too. :) And we will see how it evolves.

Panagiotis Nezis

unread,
Nov 2, 2023, 9:59:14 AM11/2/23
to elixir-l...@googlegroups.com
Ok then, I will give it a try and we can continue the discussion in the PR.

Reply all
Reply to author
Forward
0 new messages