1- # mainargs 0.7.2
1+ # mainargs 0.7.3
22
33MainArgs is a small, dependency-free library for command line argument parsing
44in 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
323323Multiple short arguments can be combined into one ` -ab ` call:
324324
325- ``` scala
326325$ ./mill example.short bools -ab true
327326Seq(true, true)
328327```
@@ -349,29 +348,30 @@ argument group is treated as a key-value pair with the remaining characters afte
349348passed 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
353352Seq (false , value)
354353
355- $ ./ mill example.short strs - a - b= value
354+ $ ./ mill example.short strs - a - b= value
356355Seq (true , value)
357356```
358357
359358You 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
366365If 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
368367passing 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
372371Seq (true , key= value)
373372```
374373
374+ ``` scala
375375These can also be combined into a single token, with the first non- `Flag` short argument in the
376376token consuming the subsequent characters as a string (unless the subsequent characters start with
377377an `=`, 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