Commit Graph

  • c494f8b8f3 Support required combined with xor groups. Alec Thomas 2021-06-21 19:25:05 +09:30
  • 54558f65e8 Allow multiple xor:"" groups to be defined. Alec Thomas 2021-06-21 18:58:44 +09:30
  • 8aa52739ea Don't fail on required positional arguments that have envars. Alec Thomas 2021-06-21 17:11:10 +09:30
  • a8244400e3 DefaultEnvars option (#177) Evgeny 2021-06-20 17:27:56 +07:00
  • 2d879d2037 Add an option to clamp the help wrap width Kartikaya Gupta 2021-06-16 08:50:46 -04:00
  • 33ce628ecd Hermitise CI. Alec Thomas 2021-06-09 13:13:50 +10:00
  • 8cbf5a6c03 Validate short flags are a single rune. Alec Thomas 2021-06-09 13:10:29 +10:00
  • ff93d67a8d Validate duplicate short flags. Alec Thomas 2021-06-09 13:01:16 +10:00
  • 6cebaa7b85 Hermitise and bump golangci-lint. Alec Thomas 2021-06-09 12:37:06 +10:00
  • c4a8cb03a7 Update docs. Alec Thomas 2021-06-07 08:56:11 +10:00
  • 1f5bbd5559 Fix issue with negatable flag being negated twice (#171) Mary Fesenko 2021-05-22 13:50:50 +02:00
  • b3bdeb18e2 Fixes #125: Support custom per-mapper placeholder text (#169) andrewbaxter 2021-05-17 20:31:07 +09:00
  • 9c81441ae0 Update go modules (#165) Toshimaru 2021-05-03 13:16:08 +09:00
  • 2e611623a7 Don't display placeholder for counters. Alec Thomas 2021-04-18 10:05:26 +10:00
  • 8d859b918f Add some details to the ignore field example Fabian Gutierrez 2021-04-14 17:03:44 +02:00
  • 5fd7249c69 fix panic resolver's configuration file does not have read permission Rene Zbinden 2021-04-13 14:45:20 +02:00
  • d4dd709445 tag: add passthrough for positional arguments Franklin "Snaipe" Mathieu 2021-04-04 19:30:00 +02:00
  • 49417fe966 Add support for dynamically registered commands. Alec Thomas 2021-04-02 11:27:28 +11:00
  • 57bfb058d5 mapper: correct text/binary typo Saj Goonatilleke 2021-03-18 00:30:42 +11:00
  • 0c83d0f8dc Lint fix. Alec Thomas 2021-03-13 21:13:23 +11:00
  • 93f73cf38c Display multiple optional args in a more expected way. Alec Thomas 2021-03-13 20:25:26 +11:00
  • 09467435e1 Add option to not expand subcommand help Dustin Spicuzza 2021-03-09 00:28:38 -05:00
  • 456575db97 Allow - for stdout in path mapper (#147) Andrew Haines 2021-03-02 05:26:10 +00:00
  • d48f4e59c3 Add negatable output when using short flag names Joe Schmitt 2021-03-01 16:41:31 -05:00
  • ed24960916 Implement code review feedback Joe Schmitt 2021-02-24 14:13:11 -05:00
  • 454f2c067e Add test case for inverting the negation Joe Schmitt 2021-02-18 11:38:31 -05:00
  • 2fdddc4f51 Add negatable tag to set a bool to be negatable. Joe Schmitt 2021-02-18 10:55:55 -05:00
  • 2a0d7af9c5 Add support for negated boolean flags Joe Schmitt 2021-02-18 02:49:07 -05:00
  • 541ee3302f Create FUNDING.yml Alec Thomas 2021-03-01 16:59:26 +11:00
  • 1300b2a3bd options: Add kong.ShortUsageOnError() option Julia Ogris 2021-02-13 18:37:59 +11:00
  • f306ae1529 Add aliases to tree help output Joe Schmitt 2021-02-12 11:51:30 -05:00
  • 405b2f4fd9 Help Option to position flags in help output Jaco Coetzee 2021-02-09 10:21:40 +02:00
  • abbc2dfc2c More group formatting tweaks. Alec Thomas 2021-02-09 15:23:05 +11:00
  • 294d1d1717 Add a bit of extra spacing if group description is provided. Alec Thomas 2021-02-09 15:17:29 +11:00
  • 7e27c8ecf5 Support a simplified kong.Groups{<key>: <title>} way of specifiying groups. Alec Thomas 2021-02-09 15:08:22 +11:00
  • b68e1aba63 Add support for groups in the default HelpPrinter (#135) Mickaël Menu 2021-02-08 20:58:43 +01:00
  • 2479d83cc0 Add support for command aliases (#130) Joe Schmitt 2021-01-10 15:36:13 -05:00
  • d78d607800 Fully describe how help is generated. Alec Thomas 2020-12-06 14:59:38 +11:00
  • 3d57e73d11 Ensure values aren't nil before decoding. Alec Thomas 2020-12-04 16:14:16 +11:00
  • 5a9b3ae012 Fix return err for PrintUsage Sarah Franc 2020-11-12 00:59:40 +01:00
  • 26524e0cc1 Actually test filename. Alec Thomas 2020-10-30 15:36:16 +11:00
  • 8bf0a335db Add NamedFileContentFlag. Alec Thomas 2020-10-30 15:26:38 +11:00
  • 097bba54ec Revert UsageOnMissing. Alec Thomas 2020-10-27 17:32:34 +11:00
  • 73064c7b8f Fix README again. Alec Thomas 2020-10-21 20:26:16 +11:00
  • 74d8f6d21b Unbreak README. Alec Thomas 2020-10-21 19:38:05 +11:00
  • 38db823367 Call Validate() functions on nodes if present. Alec Thomas 2020-10-21 19:13:02 +11:00
  • a062611ecf Do not run parent node on missing child err with usageOnMissing option hasheddan 2020-10-04 19:27:12 -05:00
  • 5b3fd5476a Refactor k.FatalIfErrorf to use k.Fatalf Sven Nebel 2020-10-10 21:03:14 +01:00
  • 5cf89d77b1 Fix minor typo in README hasheddan 2020-10-07 19:26:28 -05:00
  • 259d19076d Add support for plugins. Alec Thomas 2020-09-16 15:50:50 +10:00
  • 067f0e835f More useful error message when finding an unexpected struct. Alec Thomas 2020-09-12 16:31:55 +10:00
  • d1821a0666 Add UsageOnMissing option to Kong hasheddan 2020-09-11 15:48:39 -05:00
  • 88ecc9c4e9 Fix enum's from envars not validating (fixes #107). Alec Thomas 2020-09-08 13:09:04 +10:00
  • cbae65d227 Make PostBuild global. Alex Snast 2020-08-24 09:18:10 +03:00
  • f410bb770f Fix typo Muhammad Talal Anwar 2020-07-26 19:16:53 +02:00
  • 055081422d When using resolvers, use last value only. Alec Thomas 2020-07-10 16:37:03 +10:00
  • e10381694b Allow unsetting of FileContentFlag values. Alec Thomas 2020-07-10 13:52:32 +10:00
  • 047801d760 Correctly return errors when configuration parsing fails. Alec Thomas 2020-07-08 21:12:29 +10:00
  • d480572d75 Make counter flags more flexible. Alec Thomas 2020-06-10 15:40:22 +10:00
  • d4822839a2 Add GetSep to simplify Tag initialisation Cam Hutchison 2020-06-02 11:19:45 +10:00
  • f19f1031c0 Format help placeholders with slice/map separators Cam Hutchison 2020-06-02 08:17:42 +10:00
  • b89354adb0 Fix sep:"none" and mapsep:"none" Cam Hutchison 2020-06-01 22:27:02 +10:00
  • b11ebc500b Fix help tests with the introduction of -h Cam Hutchison 2020-06-01 21:43:09 +10:00
  • c77deac080 Added -h as default short parameter for the automatic --help flag. Dima Kotik 2020-06-01 11:33:38 +03:00
  • 7bdb319cf1 move CloneWith() call into interpolate() Will Roden 2020-05-15 16:36:04 -05:00
  • f19cb8c69d factor CloneWith out of most interpolate cases Will Roden 2020-05-15 15:54:00 -05:00
  • 1ccbbb9db4 add benchmark Will Roden 2020-05-15 15:52:24 -05:00
  • c690640e71 Format file. Alec Thomas 2020-05-05 12:13:58 +10:00
  • c69b9a1e88 added post-build option (#78) Freestate17 2020-05-04 18:14:33 -04:00
  • 2d809c073b Fix integer overlows in tests on 32-bit systems. Alec Thomas 2020-04-30 19:48:20 +10:00
  • ed7caf6841 Revert "Convert env management to a resolver." Alec Thomas 2020-04-30 17:03:21 +10:00
  • b6ff115b3e Correctly parse all numeric types. Alec Thomas 2020-04-29 09:09:28 +10:00
  • d69514dd55 Update README with note about existingfile and -. Alec Thomas 2020-04-27 09:13:11 +10:00
  • 51a1ea979a Ensure "existingfile" doesn't choke on "-". Alec Thomas 2020-04-27 09:10:44 +10:00
  • 407c8229a6 Allow "-" as a positional or flag argument. Alec Thomas 2020-04-27 09:06:10 +10:00
  • 860aaac388 Allow Run() on arbitrary nodes. Alec Thomas 2020-04-26 18:59:44 +10:00
  • fbe8d48e4b Convert env management to a resolver. Alec Thomas 2020-04-16 22:19:21 +10:00
  • a77a484f6a Add doc for "-" tag Ryan Hall 2020-04-07 09:19:39 -07:00
  • 109dce7ea5 Expand variables in config paths. Alec Thomas 2020-03-05 11:27:53 +11:00
  • b8c82fea7c Allow binds to be provided by a function. Alec Thomas 2020-03-03 13:57:56 +11:00
  • c45ea59559 Add type:"counter". Alec Thomas 2020-03-01 14:33:43 +11:00
  • 7b000bd775 Add HelpValueFormatter as discussed in #60 (#61) Rene Zbinden 2020-02-21 10:24:19 +01:00
  • 73ecfde9b2 Automatically add envar to help. Alec Thomas 2020-02-19 15:49:59 +11:00
  • b21bf1031a Support interpolating "$env". Alec Thomas 2020-02-19 13:19:52 +11:00
  • af533a38fb make HelperOptions CommandTree method exported Rene Zbinden 2020-02-18 21:47:05 +01:00
  • ada7d7bf11 Fix panic when "-" is not followed by a short flag. Alec Thomas 2020-02-18 19:53:41 +11:00
  • 4667cdb6e4 change help exit code to 0 Rene Zbinden 2020-02-18 07:03:40 +01:00
  • 529703d8d1 add support to make map separator configurable Rene Zbinden 2020-02-14 10:47:58 +01:00
  • ca3a30c5f1 Make HelpOptions into an Option. Alec Thomas 2020-02-02 20:21:55 +11:00
  • b4ae5fb86e Correctly support encoding.{TextUnmarshaler,BinaryUnmarsheler} Alec Thomas 2020-02-01 18:19:03 +11:00
  • 60222fe397 Add README + go modules to server example. Alec Thomas 2020-01-24 20:02:10 +11:00
  • aeb6620dbe Don't select default command when displaying help. Alec Thomas 2020-01-23 21:19:23 +11:00
  • b66dcf3279 Support default commands. Alec Thomas 2020-01-23 20:56:25 +11:00
  • 5db71ed657 Fix missing := in example code Dave Rolsky 2020-01-21 15:24:39 -06:00
  • 01b720cb19 Test and docs for TextUnmarshaler and json.Unmarshaler. Alec Thomas 2020-01-10 12:15:38 +11:00
  • d4df212f82 Update README.md Alec Thomas 2019-12-31 11:58:46 +11:00
  • d21a9f865d Update golangci-lint. Alec Thomas 2019-12-31 11:48:30 +11:00
  • 8a348f10f5 Tweak README. Alec Thomas 2019-12-31 11:25:56 +11:00
  • 54c88a9d43 Fix hook sample in README.md. Julia Ogris 2019-11-26 10:51:19 +11:00
  • a341a59d82 Don't validate enum values for unused required paths. Alec Thomas 2019-11-20 17:36:53 +11:00