Skip to content

Commit 9c3ce1e

Browse files
committed
0.7.3
1 parent 33c67be commit 9c3ce1e

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

readme.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mainargs 0.7.2
1+
# mainargs 0.7.3
22

33
MainArgs is a small, dependency-free library for command line argument parsing
44
in Scala.
@@ -38,7 +38,7 @@ in its scripts, as well as for command-line parsing for the
3838
# Usage
3939

4040
```scala
41-
ivy"com.lihaoyi::mainargs:0.7.2"
41+
ivy"com.lihaoyi::mainargs:0.7.3"
4242
```
4343

4444
## Parsing Main Method Parameters
@@ -322,7 +322,6 @@ Seq(false, true)
322322

323323
Multiple short arguments can be combined into one `-ab` call:
324324

325-
```scala
326325
$ ./mill example.short bools -ab true
327326
Seq(true, true)
328327
```
@@ -349,29 +348,30 @@ argument group is treated as a key-value pair with the remaining characters afte
349348
passed as the value to the first short argument:
350349

351350
```scala
352-
$ ./mill example.short strs -b=value
351+
$ ./mill example.short strs -b=value
353352
Seq(false, value)
354353

355-
$ ./mill example.short strs -a -b=value
354+
$ ./mill example.short strs -a -b=value
356355
Seq(true, value)
357356
```
358357

359358
You can use `-b=` as a shorthand to set the value of `b` to an empty string:
360359

361360
```scala
362-
$ ./mill example.short strs -a -b=
363-
Seq(true, )
361+
$ ./mill example.short strs -a -b=
362+
Seq(true, )
364363
```
365364

366365
If an `=` is present in the short argument group after subsequent character, all characters
367-
except the first are passed to the first short argument. This can be useful for concisely
366+
except the first are passed to the first short argument. This can be useful for concisely
368367
passing key-value pairs to a short argument:
369368

370369
```scala
371-
$ ./mill example.short strs -a -bkey=value
370+
$ ./mill example.short strs -a -bkey=value
372371
Seq(true, key=value)
373372
```
374373

374+
```scala
375375
These can also be combined into a single token, with the first non-`Flag` short argument in the
376376
token consuming the subsequent characters as a string (unless the subsequent characters start with
377377
an `=`, which is skipped):
@@ -625,6 +625,11 @@ command-line friendly tool.
625625

626626
# Changelog
627627

628+
## 0.7.3
629+
630+
- Add missing `nameMapper` argument to `.runOrExit`, make `sort` param on `runEither` return
631+
`true` for consistency with the docs [#155](https://github.com/com-lihaoyi/mainargs/pull/155)
632+
628633
## 0.7.2
629634

630635
- Various improvements to Scala 3 macros to match Scala 2 implementation [#148](https://github.com/com-lihaoyi/mainargs/pull/148)

0 commit comments

Comments
 (0)