Skip to content

Commit

Permalink
Release version 1.1.0
Browse files Browse the repository at this point in the history
* Add `List<String>` overloads to `CliktCommand.parse` and `main`
* Add `err` parameter to `TermUi.echo`
* Add `error` property to `Abort`
  • Loading branch information
ajalt committed Apr 15, 2018
1 parent 6960fe9 commit 51f6c7a
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ list, then you can add Clikt to your project:

```groovy
dependencies {
compile 'com.github.ajalt:clikt:1.0.0'
compile 'com.github.ajalt:clikt:1.1.0'
}
```

Expand Down
4 changes: 2 additions & 2 deletions docs/api/clikt/com.github.ajalt.clikt.core/-abort/-init-.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<a href="../../index.html">clikt</a>&nbsp;/&nbsp;<a href="../index.html">com.github.ajalt.clikt.core</a>&nbsp;/&nbsp;<a href="index.html">Abort</a>&nbsp;/&nbsp;<a href="./-init-.html">&lt;init&gt;</a><br/>
<br/>
<h1>&lt;init&gt;</h1>
<a name="com.github.ajalt.clikt.core.Abort$&lt;init&gt;()"></a>
<code><span class="identifier">Abort</span><span class="symbol">(</span><span class="symbol">)</span></code>
<a name="com.github.ajalt.clikt.core.Abort$&lt;init&gt;(kotlin.Boolean)"></a>
<code><span class="identifier">Abort</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.Abort$<init>(kotlin.Boolean)/error">error</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;true<span class="symbol">)</span></code>
<p>An internal error that signals Clikt to abort.</p>
</BODY>
</HTML>
18 changes: 18 additions & 0 deletions docs/api/clikt/com.github.ajalt.clikt.core/-abort/error.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>Abort.error - clikt</title>
<link rel="stylesheet" href="..\..\..\style.css">
</HEAD>
<BODY>
<a href="../../index.html">clikt</a>&nbsp;/&nbsp;<a href="../index.html">com.github.ajalt.clikt.core</a>&nbsp;/&nbsp;<a href="index.html">Abort</a>&nbsp;/&nbsp;<a href="./error.html">error</a><br/>
<br/>
<h1>error</h1>
<a name="com.github.ajalt.clikt.core.Abort$error"></a>
<code><span class="keyword">val </span><span class="identifier">error</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a></code>
<p>If true, print "Aborted" and exit with an error code. Otherwise, exit with no error code.</p>
<h3>Property</h3>
<p><a name="error"></a>
<code>error</code> - If true, print "Aborted" and exit with an error code. Otherwise, exit with no error code.</p>
</BODY>
</HTML>
16 changes: 15 additions & 1 deletion docs/api/clikt/com.github.ajalt.clikt.core/-abort/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,25 @@ <h3>Constructors</h3>
<p><a href="-init-.html">&lt;init&gt;</a></p>
</td>
<td>
<code><span class="identifier">Abort</span><span class="symbol">(</span><span class="symbol">)</span></code>
<code><span class="identifier">Abort</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.Abort$<init>(kotlin.Boolean)/error">error</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a>&nbsp;<span class="symbol">=</span>&nbsp;true<span class="symbol">)</span></code>
<p>An internal error that signals Clikt to abort.</p>
</td>
</tr>
</tbody>
</table>
<h3>Properties</h3>
<table>
<tbody>
<tr>
<td>
<p><a href="error.html">error</a></p>
</td>
<td>
<code><span class="keyword">val </span><span class="identifier">error</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a></code>
<p>If true, print "Aborted" and exit with an error code. Otherwise, exit with no error code.</p>
</td>
</tr>
</tbody>
</table>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,18 @@ <h3>Functions</h3>
<p><a href="main.html">main</a></p>
</td>
<td>
<code><span class="keyword">fun </span><span class="identifier">main</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.Array((kotlin.String)))/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<code><span class="keyword">fun </span><span class="identifier">main</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.collections.List((kotlin.String)))/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html"><span class="identifier">List</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Parse the command line and print helpful output if any errors occur.</p>
</td>
<code><span class="keyword">fun </span><span class="identifier">main</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.Array((kotlin.String)))/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code></td>
</tr>
<tr>
<td>
<p><a href="parse.html">parse</a></p>
</td>
<td>
<code><span class="keyword">fun </span><span class="identifier">parse</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/context">context</span><span class="symbol">:</span>&nbsp;<a href="../-context/index.html"><span class="identifier">Context</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<code><span class="keyword">fun </span><span class="identifier">parse</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.collections.List((kotlin.String)), com.github.ajalt.clikt.core.Context)/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html"><span class="identifier">List</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.collections.List((kotlin.String)), com.github.ajalt.clikt.core.Context)/parentContext">parentContext</span><span class="symbol">:</span>&nbsp;<a href="../-context/index.html"><span class="identifier">Context</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Parse the command line and throw an exception if parsing fails.</p>
</td>
<code><span class="keyword">fun </span><span class="identifier">parse</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/parentContext">parentContext</span><span class="symbol">:</span>&nbsp;<a href="../-context/index.html"><span class="identifier">Context</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code></td>
</tr>
<tr>
<td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
<a href="../../index.html">clikt</a>&nbsp;/&nbsp;<a href="../index.html">com.github.ajalt.clikt.core</a>&nbsp;/&nbsp;<a href="index.html">CliktCommand</a>&nbsp;/&nbsp;<a href="./main.html">main</a><br/>
<br/>
<h1>main</h1>
<a name="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.Array((kotlin.String)))"></a>
<code><span class="keyword">fun </span><span class="identifier">main</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.Array((kotlin.String)))/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<a name="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.collections.List((kotlin.String)))"></a>
<code><span class="keyword">fun </span><span class="identifier">main</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.collections.List((kotlin.String)))/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html"><span class="identifier">List</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Parse the command line and print helpful output if any errors occur.</p>
<p>This function calls <a href="parse.html">parse</a> and catches and <a href="../-clikt-error/index.html">CliktError</a>s that are thrown. Other error are allowed to
pass through.</p>
<a name="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.Array((kotlin.String)))"></a>
<code><span class="keyword">fun </span><span class="identifier">main</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$main(kotlin.Array((kotlin.String)))/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
</BODY>
</HTML>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
<a href="../../index.html">clikt</a>&nbsp;/&nbsp;<a href="../index.html">com.github.ajalt.clikt.core</a>&nbsp;/&nbsp;<a href="index.html">CliktCommand</a>&nbsp;/&nbsp;<a href="./parse.html">parse</a><br/>
<br/>
<h1>parse</h1>
<a name="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)"></a>
<code><span class="keyword">fun </span><span class="identifier">parse</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/context">context</span><span class="symbol">:</span>&nbsp;<a href="../-context/index.html"><span class="identifier">Context</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<a name="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.collections.List((kotlin.String)), com.github.ajalt.clikt.core.Context)"></a>
<code><span class="keyword">fun </span><span class="identifier">parse</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.collections.List((kotlin.String)), com.github.ajalt.clikt.core.Context)/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html"><span class="identifier">List</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.collections.List((kotlin.String)), com.github.ajalt.clikt.core.Context)/parentContext">parentContext</span><span class="symbol">:</span>&nbsp;<a href="../-context/index.html"><span class="identifier">Context</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
<p>Parse the command line and throw an exception if parsing fails.</p>
<p>You should use <a href="main.html">main</a> instead unless you want to handle output yourself.</p>
<a name="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)"></a>
<code><span class="keyword">fun </span><span class="identifier">parse</span><span class="symbol">(</span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/argv">argv</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html"><span class="identifier">Array</span></a><span class="symbol">&lt;</span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="com.github.ajalt.clikt.core.CliktCommand$parse(kotlin.Array((kotlin.String)), com.github.ajalt.clikt.core.Context)/parentContext">parentContext</span><span class="symbol">:</span>&nbsp;<a href="../-context/index.html"><span class="identifier">Context</span></a><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html"><span class="identifier">Unit</span></a></code>
</BODY>
</HTML>
Loading

0 comments on commit 51f6c7a

Please sign in to comment.