leiningen icon indicating copy to clipboard operation
leiningen copied to clipboard

lein aliases shadow help entirely

Open timvisher opened this issue 9 years ago • 5 comments

I believe there's no way to get help for a task once you've aliased its name. This could be considered bad practice but it's also quite useful. Could there be a way for help maybe to print both the aliases and the usage? Or maybe provide a second lein alias sub-command akin to alias in bash?

https://gist.github.com/timvisher/36a5ddfcb9f903cdc408a739d99a46fe

timvisher avatar Sep 02 '16 18:09 timvisher

I like the idea of having the alias help first, then information telling you that it shadows a proper task, along with its docstring. That should probably also work when you do lein help without any arguments.

e.g.

...

These aliases are available:
repl: Start a REPL with some extra useful dependencies added.
  This alias shadows the repl task:
  repl        Start a repl session either with the current project or standalone.
eval: Evaluate a Clojure string with clojure.main/main.

...

Happy to take a patch for this

hypirion avatar Sep 10 '16 12:09 hypirion

@hyPiRion Isn't this done already? I tried it with Leiningen 2.7.1 on a sample project which has the following alias :aliases {"test-all" ["test"]}

$ lein help test-all
test-all is an alias, expands to ["test"]

It looks like its already patched. Can you confirm? If done can you close this issue? Thanks.

firesofmay avatar Mar 12 '17 16:03 firesofmay

@firesofmay, I think what is being described is that if someone aliases test, there is no longer a way to get help on the original built-in test command with lein help test.

danielcompton avatar Mar 12 '17 21:03 danielcompton

@danielcompton correct.

timvisher avatar Mar 13 '17 16:03 timvisher

@danielcompton Ah I see. How would I go about fixing this? Can you guide me to the namespaces I should look at?

firesofmay avatar Mar 13 '17 16:03 firesofmay