Skip to content

Releases: hellflame/argparse

v1.7.4

03 Mar 14:21

Choose a tag to compare

Improve

  1. get terminal width only once

Full Changelog: v1.7.3...v1.7.4

v1.7.3

02 Mar 15:56

Choose a tag to compare

Fix for #11 :

  • Invoked Action

if subparser is invoked, the root parser will NOT be invoked.

  • When Not Invoked

if subparser is NOT invoked, no argument's default value will be applied, and required argument will not be checked ... The subparser remains dead.

Full Changelog: v1.7.2...v1.7.3

v1.7.2

28 Feb 11:29
563533a

Choose a tag to compare

What's Changed

  • Renamed optional arguments to options as proposed in #9 by @myOmikron in #10

New Contributors

Full Changelog: v1.7.1...v1.7.2

v1.7.1

13 Feb 06:22

Choose a tag to compare

  1. update readme (include zh-cn)
  2. update pr template
  3. add example about position of arguments in help menu

v1.7.0

04 Feb 07:39

Choose a tag to compare

  1. better help menu for long args
  2. update readme

v1.6.0

15 Oct 16:00

Choose a tag to compare

add hint support

hint info can be replaced by customizing help info

v1.5.1

27 Jul 00:27

Choose a tag to compare

  1. update eg state
  2. overwrite last error publish

v1.5.0

25 Jul 15:26

Choose a tag to compare

  1. replace parse exit with new error type #6
  2. update readme

it will not make old code break, but be able to deal errors more specifically

if e := p.Parse(nil); e != nil {
  switch e.(type) {
    case argparse.BreakAfterHelp:  // match for default help showed
    os.Exit(1)
    case argparse.BreakAfterShellScript:  // match for auto completion showed
    default:
      fmt.Printf(e.Error())  // normal parse errors
  }
  return
}

v1.4.1

08 Jun 14:36

Choose a tag to compare

  1. update InvokeAction with argument

v1.4.0

07 Jun 13:33

Choose a tag to compare

  1. add Invoked & InvokeAction
  2. update readme