Welcome! Please see the About page for a little more info on how this works.

+4 votes
in Tools by

Although the documentation does mention help/doc and help/dir, it's not obvious for users how to get help on tools unless they read the entire doc page carefully.

It would help users figure out how to use tools if the -Ttools functions were a bit more verbose and suggested how to get help.

I don't think much can be done about this:

$ clojure -Ttools
No function found on command line or in :exec-fn

but adding a help function would mean that the next thing a user might try could work:

$ clojure -Ttools help
Namespace clojure.tools.tools.api loaded but function not found: help

Telling users that the following can be used to get a list of available functions or to get more expansive help would guide them to the next function to use:

$ clojure -A:deps -Ttools help/dir
$ clojure -A:deps -Ttools help/doc

In addition, the list function could suggest how to get help on a specific, installed tool:

$ clojure -Ttools list
TOOL     LIB                              TYPE  VERSION
clj-new  com.github.seancorfield/clj-new  :git  v1.2.362
new      io.github.seancorfield/deps-new  :git  v0.4.0
nvd      io.github.rm-hull/nvd-clojure    :git  4b0c448
poly     io.github.polyfy/polylith        :git  768642a
tools    io.github.clojure/tools.tools    :git  v0.2.1
# add the following (arbitrarily picking the first one, perhaps):
For help with a specific tool, e.g., clj-new:
    clojure -A:deps -Tclj-new help/doc

The same could be added to the show function.

1 Answer

0 votes
selected by