Skip to content

Commit 341060e

Browse files
committed
Improve (and test) help formatting w/long progname
1 parent 9978a26 commit 341060e

File tree

3 files changed

+224
-5
lines changed

3 files changed

+224
-5
lines changed

CHANGELOG.md

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- Improve help formatting w/long program names
13+
814
## 2.0.0 - 2017-04-21
915

1016
### Added
@@ -95,3 +101,172 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
95101
### Added
96102

97103
- Initial release
104+
105+
* 9978a26 - Remove defunct TODO (4 hours ago)<Laurence Gonsalves>
106+
* 83976d8 - Upgrade kotlintest to 2.0.1 (4 hours ago)<Laurence Gonsalves>
107+
* d45facd - (origin/master) [Gradle Release Plugin] - new version commit: '2.0.1-SNAPSHOT'. (3 days ago)<Laurence Gonsalves>
108+
* 81255f1 - (tag: 2.0.0) Release 2.0.0 (3 days ago)<Laurence Gonsalves>
109+
* 3016283 - Improve README.md (3 days ago)<Laurence Gonsalves>
110+
* 40202f1 - Improve epilogue formatting (3 days ago)<Laurence Gonsalves>
111+
* 8e91c69 - Remove unnecessary errorName args in tests (3 days ago)<Laurence Gonsalves>
112+
* f684782 - Make option's erroName nullable, add argName param (3 days ago)<Laurence Gonsalves>
113+
* c65cbca - Remove completed TODO comments (3 days ago)<Laurence Gonsalves>
114+
* ed620c7 - Clean up DelegateProvider's API and add test (3 days ago)<Laurence Gonsalves>
115+
* 39edfe8 - Reorder args in option method, rem auto-naming (4 days ago)<Laurence Gonsalves>
116+
* 7f4c2af - Add option and argument name validation (4 days ago)<Laurence Gonsalves>
117+
* 096f3e3 - Update CHANGELOG in preparation for 2.0.0 release (4 days ago)<Laurence Gonsalves>
118+
* a0e384b - (dev) Improve help DefaultHelpFormatter (4 days ago)<Laurence Gonsalves>
119+
* 6519b75 - Add some TODO comments (4 days ago)<Laurence Gonsalves>
120+
* 37355c4 - Replace runMain with mainBody (4 days ago)<Laurence Gonsalves>
121+
* ea6a2e2 - Make option method public (4 days ago)<Laurence Gonsalves>
122+
* 5311ab9 - Port tests to kotlintest (6 days ago)<Laurence Gonsalves>
123+
* 1bc1474 - Change Delegate into abstract class (3 weeks ago)<Laurence Gonsalves>
124+
* 1421ca3 - Use keepachangelog.com format for CHANGELOG.md (6 weeks ago)<Laurence Gonsalves>
125+
* 3d83aea - Set githubReleaseNotesFile in bintrayUpload target (6 weeks ago)<Laurence Gonsalves>
126+
* c8b78d5 - Upgrade dependencies to latest versions (6 weeks ago)<Laurence Gonsalves>
127+
* d7bd412 - [Gradle Release Plugin] - new version commit: '1.1.1-SNAPSHOT'. (7 weeks ago)<Laurence Gonsalves>
128+
* cff39a1 - (tag: 1.1.0) [Gradle Release Plugin] - pre tag commit: '1.1.0'. (7 weeks ago)<Laurence Gonsalves>
129+
* a5fc265 - Update CHANGELOG.md for 1.1.0 (7 weeks ago)<Laurence Gonsalves>
130+
* c5b10bf - Implement auto-naming of options and positionals (7 weeks ago)<Laurence Gonsalves>
131+
* 5d0b6c7 - Update CHANGELOG.md (7 weeks ago)<Laurence Gonsalves>
132+
* a895f67 - [Gradle Release Plugin] - new version commit: '1.0.3-SNAPSHOT'. (7 weeks ago)<Laurence Gonsalves>
133+
* e6bf3f2 - (tag: 1.0.2) [Gradle Release Plugin] - pre tag commit: '1.0.2'. (7 weeks ago)<Laurence Gonsalves>
134+
* 17b5afc - Upgrade to Kotlin 1.1, extract xenocom (7 weeks ago)<Laurence Gonsalves>
135+
* 8c2b630 - Change bullets->subheads in Parsing README (3 months ago)<Laurence Gonsalves>
136+
* bb8d326 - Document parsing in README.md (3 months ago)<Laurence Gonsalves>
137+
* 2f309f2 - Don't use shields.io for Travis or bintray badges (3 months ago)<Laurence Gonsalves>
138+
* 5ebae7f - Adjust logo page margins (3 months ago)<Laurence Gonsalves>
139+
* 3a5f698 - Fix rawgit logo link in README (3 months ago)<Laurence Gonsalves>
140+
* 373deeb - Use 3-backticks for code blocks in README (3 months ago)<Laurence Gonsalves>
141+
* 77c408a - Use Commodore 64 font instead of Teko in logo (3 months ago)<Laurence Gonsalves>
142+
* eafa449 - Cleanup README.md (3 months ago)<Laurence Gonsalves>
143+
* 12fd108 - Work around Github bug 316, attempt #2 (3 months ago)<Laurence Gonsalves>
144+
* 3f395e6 - Work around github's local SVG in README bug (3 months ago)<Laurence Gonsalves>
145+
* 8056d76 - Tweak README images (3 months ago)<Laurence Gonsalves>
146+
* 953d7d0 - Add .travis.yml as per https://docs.travis-ci.com/ (3 months ago)<Laurence Gonsalves>
147+
* 6da5957 - Add CHANGELOG.md (3 months ago)<Laurence Gonsalves>
148+
* ca771ac - [Gradle Release Plugin] - new version commit: '1.0.2-SNAPSHOT'. (3 months ago)<Laurence Gonsalves>
149+
* 0e101f2 - (tag: 1.0.1) [Gradle Release Plugin] - pre tag commit: '1.0.1'. (3 months ago)<Laurence Gonsalves>
150+
* 568ceb8 - Make columns param of runMain default to null (3 months ago)<Laurence Gonsalves>
151+
* 119a7e4 - Bump kotlin_version to latest stable: 1.0.6 (3 months ago)<Laurence Gonsalves>
152+
* 0a91398 - Enable `gradle install` for local maven repo (3 months ago)<Laurence Gonsalves>
153+
* 2d2a874 - Add download and license badges to README.md (3 months ago)<Laurence Gonsalves>
154+
* 86e5e26 - [Gradle Release Plugin] - new version commit: '1.0.1-SNAPSHOT'. (3 months ago)<Laurence Gonsalves>
155+
* 33c3fd9 - (tag: 1.0.0) [Gradle Release Plugin] - pre tag commit: '1.0.0'. (3 months ago)<Laurence Gonsalves>
156+
* 1b44294 - Add ktlint to gradle check rule (3 months ago)<Laurence Gonsalves>
157+
* 67f2b93 - Fix ktlint errors (3 months ago)<Laurence Gonsalves>
158+
* fd8c6d8 - Add KDoc comments wherever missing (3 months ago)<Laurence Gonsalves>
159+
* 1abd970 - Generate dokka-style docs in addition to Javadocs (3 months ago)<Laurence Gonsalves>
160+
* 14667a6 - Add logo to README (3 months ago)<Laurence Gonsalves>
161+
* 5d17851 - Test prologue and epilogue of DefaultHelpFormatter (3 months ago)<Laurence Gonsalves>
162+
* fced0cc - Move arg parsing exceptions to ArgParser.kt (3 months ago)<Laurence Gonsalves>
163+
* d36ddd3 - Rename valueName -> errorName, hide some internals (3 months ago)<Laurence Gonsalves>
164+
* bb291a4 - Reformat code (automated) (3 months ago)<Laurence Gonsalves>
165+
* a31dbdb - Update README to reflect mandatory help argument (3 months ago)<Laurence Gonsalves>
166+
* 4841c6f - Add comments explaining all uses of !! (3 months ago)<Laurence Gonsalves>
167+
* b78df45 - Make help mandatory for all delegates (3 months ago)<Laurence Gonsalves>
168+
* 1764842 - (help-formatting) Implement word-wrapping and columnizing of --help (3 months ago)<Laurence Gonsalves>
169+
* 006db50 - Clean up dokka gradle tasks (4 months ago)<Laurence Gonsalves>
170+
* db1e312 - Nest ShowHelpException in ArgParser (4 months ago)<Laurence Gonsalves>
171+
* f1b7332 - Factor out printUserMessage in SystemExitException (4 months ago)<Laurence Gonsalves>
172+
* 10715fc - Rename toValueHelp to toHelpFormatterValue (4 months ago)<Laurence Gonsalves>
173+
* 33b3007 - Pass columns down to HelpFormatter (4 months ago)<Laurence Gonsalves>
174+
* 110de31 - Use .mod instead of % to avoid warnings (4 months ago)<Laurence Gonsalves>
175+
* baf39ad - Remove TODOs that now have issues (4 months ago)<Laurence Gonsalves>
176+
* c22a8c7 - Remove unused dependency on org.apache.commons (4 months ago)<Laurence Gonsalves>
177+
* 726d154 - Remove debugging println from build.gradle (4 months ago)<Laurence Gonsalves>
178+
* 940f208 - Fix bugs in bintrayUpload gradle task (4 months ago)<Laurence Gonsalves>
179+
* 8d5fd21 - Add dokka, bintray, and gradle-release support (4 months ago)<Laurence Gonsalves>
180+
* 54a501e - Fix some missed renamings in header comments (4 months ago)<Laurence Gonsalves>
181+
* 1d699fd - Clean up README (4 months ago)<Laurence Gonsalves>
182+
* 5022fad - Make ArgParser.force public (4 months ago)<Laurence Gonsalves>
183+
* 4e45fab - Rename OptionParser -> ArgParser (4 months ago)<Laurence Gonsalves>
184+
* ea38d8e - Clean up TODO comments (4 months ago)<Laurence Gonsalves>
185+
* 9a57e78 - Clean up HelpFormatter API (4 months ago)<Laurence Gonsalves>
186+
* 24e2134 - Implement --help support (4 months ago)<Laurence Gonsalves>
187+
* 561f671 - Remove bogus import (4 months ago)<Laurence Gonsalves>
188+
* d0b7000 - Change shouldThrow to use a reified type parameter (4 months ago)<Laurence Gonsalves>
189+
* eb6a106 - Change shouldThrow to use a KClass (4 months ago)<Laurence Gonsalves>
190+
* fcd2800 - Add some testing TODOs (4 months ago)<Laurence Gonsalves>
191+
* 9712722 - Rewrite the docs for the Delegate factory methods (4 months ago)<Laurence Gonsalves>
192+
* c25bc9e - Add OptionParser.counting (4 months ago)<Laurence Gonsalves>
193+
* 7196f59 - Check sizeRange for validity (4 months ago)<Laurence Gonsalves>
194+
* 2a06173 - (simple-positional) Reformat code (mostly automated) (4 months ago)<Laurence Gonsalves>
195+
* 5b6b936 - Add POSIX/GNU modes (4 months ago)<Laurence Gonsalves>
196+
* 8134eee - Add support for "--" (4 months ago)<Laurence Gonsalves>
197+
* f08dd49 - Finish implementing positional arguments (4 months ago)<Laurence Gonsalves>
198+
* 51b0d22 - Start tests of argument[List], add overloads (4 months ago)<Laurence Gonsalves>
199+
* f4f06ab - Add OptionParser.argument & argumentList (4 months ago)<Laurence Gonsalves>
200+
* 37b3e82 - Split Delegate into interface and subclasses (4 months ago)<Laurence Gonsalves>
201+
* 251d609 - Move Delegate.Input out to OptionArgumentIterator (4 months ago)<Laurence Gonsalves>
202+
* c98130e - Add Delegate.addValidator (4 months ago)<Laurence Gonsalves>
203+
* 74084f4 - Implement Input.peek and Input.hasNext (4 months ago)<Laurence Gonsalves>
204+
* 582ff87 - Clean up OptionParser.Delegate.Input properties (4 months ago)<Laurence Gonsalves>
205+
* 9661b66 - Throw UnrecognizedOptionException when appropriate (4 months ago)<Laurence Gonsalves>
206+
* 27ceeca - Disallow creation/mutation of Delegates post-parse (4 months ago)<Laurence Gonsalves>
207+
* 7325492 - Clean up TODOs (4 months ago)<Laurence Gonsalves>
208+
* 4285ae3 - Change shouldThrow usages to use run (4 months ago)<Laurence Gonsalves>
209+
* ee2a566 - Use shouldThrow in place of JUnit's "thrown" (4 months ago)<Laurence Gonsalves>
210+
* 78864b2 - Import assertEquals/True/False directly (4 months ago)<Laurence Gonsalves>
211+
* 13f51fa - Add testInitValidation and shouldThrow (4 months ago)<Laurence Gonsalves>
212+
* 1bace37 - Add OptionParser.force, move checking out of lazy (4 months ago)<Laurence Gonsalves>
213+
* 12fd091 - Add OptionParserTest.parserOf (4 months ago)<Laurence Gonsalves>
214+
* b6f172e - Correct variance of args arrays (4 months ago)<Laurence Gonsalves>
215+
* 4061152 - Remove progName from SystemExitException + parser (4 months ago)<Laurence Gonsalves>
216+
* 41d9f1d - Make SystemExitExceptions all open classes (4 months ago)<Laurence Gonsalves>
217+
* 6d6d273 - Rename inline test option classes to "Opts" (4 months ago)<Laurence Gonsalves>
218+
* 0e7f942 - Add OptionMissingRequiredArgumentException (4 months ago)<Laurence Gonsalves>
219+
* 81e5012 - Test unrecognized options (4 months ago)<Laurence Gonsalves>
220+
* e944053 - Test mapping missing with and without default set (4 months ago)<Laurence Gonsalves>
221+
* f21149d - Add testArgument_missing_withParser (4 months ago)<Laurence Gonsalves>
222+
* 9f8b3ee - Test chained options (4 months ago)<Laurence Gonsalves>
223+
* e179d34 - Rename arg(ument) to value in a few places (4 months ago)<Laurence Gonsalves>
224+
* 5096439 - Throw MissingArgumentException when appropriate (4 months ago)<Laurence Gonsalves>
225+
* d108c3f - Add testLongOptionsWithConcatenatedArgs (4 months ago)<Laurence Gonsalves>
226+
* f3ab7f2 - Add README.md (4 months ago)<Laurence Gonsalves>
227+
* ab845dc - Cleaned up docs of OptionParser methods (4 months ago)<Laurence Gonsalves>
228+
* b20ec88 - Remove `help` param to delegate factory methods (4 months ago)<Laurence Gonsalves>
229+
* df8c7a3 - Rename UserErrorException to SystemExitException (4 months ago)<Laurence Gonsalves>
230+
* e3fe674 - Close OptionParser class (4 months ago)<Laurence Gonsalves>
231+
* 57417a9 - Inline some OptionParser methods (4 months ago)<Laurence Gonsalves>
232+
* 1436cb8 - Implement OptionParser.mapping (4 months ago)<Laurence Gonsalves>
233+
* cd84906 - Stop saying "this" in parser funcs (4 months ago)<Laurence Gonsalves>
234+
* 236d3df - Clean up some exception messages (4 months ago)<Laurence Gonsalves>
235+
* ea536a8 - Begin cleanup of UserErrorExceptions (4 months ago)<Laurence Gonsalves>
236+
* 9e63cdd - Include hyphen in name of short options (4 months ago)<Laurence Gonsalves>
237+
* 095c08d - Include gradle sources in wrapper (4 months ago)<Laurence Gonsalves>
238+
* 193d102 - License everything under LGPL v2.1 (4 months ago)<Laurence Gonsalves>
239+
* 7b64264 - Add progName to OptionParser & UserErrorException (4 months ago)<Laurence Gonsalves>
240+
* 411d092 - Rename action->option, Action->Delegate (4 months ago)<Laurence Gonsalves>
241+
* e0f8894 - Fix indentation of commented-out adding overload (4 months ago)<Laurence Gonsalves>
242+
* 9c57af5 - Move OptionParser.Exception -> UserErrorException (5 months ago)<Laurence Gonsalves>
243+
* 414ddc1 - Move NAME_EQUALS_VALUE_REGEX into static field (5 months ago)<Laurence Gonsalves>
244+
* 6d1c3d0 - Use "when" for parseOption dispatching (5 months ago)<Laurence Gonsalves>
245+
* 6c35094 - Clean up parseShortOptions and parseLongOption (5 months ago)<Laurence Gonsalves>
246+
* 274fa25 - Rename {short,long}Flags to {short,Long}Options (5 months ago)<Laurence Gonsalves>
247+
* 6cd5275 - Change Input to work like an iterator (5 months ago)<Laurence Gonsalves>
248+
* 74c56f8 - Clean up docs for OptionParser.default() (5 months ago)<Laurence Gonsalves>
249+
* aef9ec7 - Rename parser methods to flagging/storing/adding (5 months ago)<Laurence Gonsalves>
250+
* 0b160ed - Implement runMain, clean up main example docs (5 months ago)<Laurence Gonsalves>
251+
* 0835fa8 - Add some TODOs (5 months ago)<Laurence Gonsalves>
252+
* 179b05e - Implement OptionParser.accumulator (5 months ago)<Laurence Gonsalves>
253+
* f77b45d - Test OptionParser.argument() (5 months ago)<Laurence Gonsalves>
254+
* f5ce626 - Test OptionParser.flag() (5 months ago)<Laurence Gonsalves>
255+
* 55d9b66 - Fix test names: Values -> Args (5 months ago)<Laurence Gonsalves>
256+
* 088ef28 - Fix test names: Flags -> Options (5 months ago)<Laurence Gonsalves>
257+
* 211b9dc - Implement flag, argument, accumulator, printAndExit (5 months ago)<Laurence Gonsalves>
258+
* 3981997 - Improve docs; use composition not inheritance (5 months ago)<Laurence Gonsalves>
259+
* e7dbe00 - Rename arg(ument)->opt(ion) and value->argument (5 months ago)<Laurence Gonsalves>
260+
* 4b1e630 - Do a bunch of cleaning up and rearranging (5 months ago)<Laurence Gonsalves>
261+
* 3d4d43e - Make passing in of option arguments null safe (5 months ago)<Laurence Gonsalves>
262+
* e5286a0 - Add Action.default for setting default values (5 months ago)<Laurence Gonsalves>
263+
* aa24884 - Add messages to TODO() calls (5 months ago)<Laurence Gonsalves>
264+
* 962d86e - Test (and fix) long flags with values (5 months ago)<Laurence Gonsalves>
265+
* b8e3685 - Test valueless long flags (5 months ago)<Laurence Gonsalves>
266+
* 83b56ed - Test mixed short flags with values (5 months ago)<Laurence Gonsalves>
267+
* d5dbfa8 - Test (and fix) parsing of mixed short flags (5 months ago)<Laurence Gonsalves>
268+
* fb6573f - Get short flags with values working (5 months ago)<Laurence Gonsalves>
269+
* 88915bc - Test parsing of chained (valueless) short flags (5 months ago)<Laurence Gonsalves>
270+
* 8d229b3 - Implement parsing of valueless short flags (5 months ago)<Laurence Gonsalves>
271+
* 744649f - Create signatures for core plumbing (5 months ago)<Laurence Gonsalves>
272+
* 08a8b8f - Start creating ArgParser (5 months ago)<Laurence Gonsalves>

0 commit comments

Comments
 (0)