ArgumentParser 1.6.0
Additions
- Options with
CaseIterable
types can now provide help descriptions on a per-value basis. (#647) - New API for accessing the shell and shell version while generating completions. (#680, #690)
- The
generate-docc-reference
plugin generates a DocC reference folder for your CLI tool. (#694, #754, #773)
Changes
- Testing and continuous integration improvements, including migrating to GitHub workflows. (#692, #693, #696, #698, #699, #700, #701, #708, #711, #718, #716, #714, #712, #732, #730, #746, #747, #760)
- The associated closure for
CompletionKind.custom
now takes three parameters: the array of shell words currently in use for the completion request, the offset in that array for the word that completions are being requested for, and the prefix of that word that precedes the cursor. In addition, the associated closure can beasync
. The single-argument closure version ofCompletionKind.custom
is deprecated with this release. (#763, #770, #782) ParsableArguments
andExpressibleByArgument
now conform toSendableMetatype
when builing with a minimum Swift 6.2 compiler. (#789)
Fixes
- Significant fixes and improvements across the entire completion script generation system, too numerous to mention here. Please note: numerous longstanding issues still remain in the completion scripts (mainly involving quoting/escaping); they will be fixed over time. A special thanks to @rgoldberg for the investment in completion script quality! (#727, #735, #738, #740, #762, #763, #775, #770, #777, #767)
- Improvements to
generate-manual
plugin. (#663, #667) - Error messaging when a user provides a single-dash option is now improved, along with other error reporting improvements. (#728, #744)
- Implementation improvements and fixes for both older and newer versions of Swift. (#676, #707, #705, #720, #666, #724, #731, #766, #685, #729, #736, #741)
- Better capturing of tool configuration in
ToolInfo
. (#669, #697) - Documentation improvements. (#657, #678, #743)
The 1.6.0 release includes contributions from @bripeticca, @cg-soft, @compnerd, @dshan4585, @heckj, @natecook1000, @rauhul, @rgoldberg, and @Steelskin. Thank you!