<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions in tools.tools</title>
<link>https://ask.clojure.org/index.php/questions/contrib-libs/tools-tools</link>
<description></description>
<item>
<title>Could :tools/usage support :exec-fn to provide a default?</title>
<link>https://ask.clojure.org/index.php/11488/could-tools-usage-support-exec-fn-to-provide-a-default</link>
<description>&lt;p&gt;Currently, &lt;code&gt;:tools/usage&lt;/code&gt; supports &lt;code&gt;:ns-default&lt;/code&gt; and &lt;code&gt;:ns-aliases&lt;/code&gt; but there's no way to provide a default function to be executed -- even though &lt;code&gt;-X&lt;/code&gt; and &lt;code&gt;deps.edn&lt;/code&gt; do support a default function.&lt;/p&gt;
&lt;p&gt;This would allow tool authors to either provide help as a default when someone runs a tool like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -Tsome-tool
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or to default to the most common operation, for example &lt;code&gt;deps-new&lt;/code&gt; could default to &lt;code&gt;create&lt;/code&gt; so that it could be omitted from commands that use templates:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clojure -Sdeps '{:deps {io.github.cryogen-project/cryogen {:git/tag &quot;0.6.6&quot; :git/sha &quot;fcb2833&quot;}}}' -Tnew :template org.cryogenweb/new :name myname/myblog
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(this is an example from Cryogen's README -- and it is currently incorrect usage because &lt;code&gt;create&lt;/code&gt; is missing but given a &lt;code&gt;:template&lt;/code&gt;, the only function it makes sense to call is &lt;code&gt;create&lt;/code&gt; in this case).&lt;/p&gt;
</description>
<category>tools.tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11488/could-tools-usage-support-exec-fn-to-provide-a-default</guid>
<pubDate>Sun, 16 Jan 2022 22:24:24 +0000</pubDate>
</item>
<item>
<title>List SHA if version tag not available in clj -Ttools list</title>
<link>https://ask.clojure.org/index.php/11150/list-sha-if-version-tag-not-available-in-clj-ttools-list</link>
<description>&lt;p&gt;If I install a clojure tool with a git SHA, in contrast to using a git tag, and then I do &lt;code&gt;clj -Ttools list&lt;/code&gt;, the &lt;code&gt;Version&lt;/code&gt; column in the output is empty. It would be helpful if the SHA is displayed in the case where there is no version tag.&lt;/p&gt;
</description>
<category>tools.tools</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11150/list-sha-if-version-tag-not-available-in-clj-ttools-list</guid>
<pubDate>Mon, 11 Oct 2021 03:29:20 +0000</pubDate>
</item>
</channel>
</rss>