getoptions

An elegant option/argument parser for shell scripts (full support for bash and all POSIX shells)

CC0-1.0 License

Stars
407
Committers
6

Bot releases are visible (Hide)

getoptions - v3.3.2 Latest Release

Published by github-actions[bot] 2 months ago

  • Fixes Makefile
  • Fixes -f- not to be interpreted as -f --
  • Fixes -f-flag not to be interpreted as -f --flag
getoptions - v3.3.1

Published by github-actions[bot] 3 months ago

Fixed

  • Fixes for Schily Bourne Shell (bosh/pbosh 2023/01/12).
  • Fixed broken --shellcheck
  • Minor fixes for old yash (POSIXly-correct mode).

Changed

  • gengetoptions: Hide the -d (--definition) option.
getoptions - v3.3.0

Published by github-actions[bot] over 3 years ago

Added

  • getoptions: Make the parser name optional
  • Support installation via Homebrew
getoptions - v3.2.0

Published by github-actions[bot] over 3 years ago

Added

  • Added the feature to parse options directly by default parser name
getoptions - v3.1.0

Published by github-actions[bot] over 3 years ago

Added

  • gengetoptions: Added embed subcommand.

Changed

  • gengetoptions: Deprecate the -d (--definition) option.
getoptions - v3.0.0

Published by github-actions[bot] over 3 years ago

Added

  • Added support for --with-* and --without-* options.
    • #20: Thanks to Cem Keylan.
  • Added new option parser generator gengetoptions.
  • Added build system.
  • Added support for handling of missing commands (eval "$(getoptions ...) exit 1").

Changed

  • Changed Attribute off to no. [breaking change]
  • Changed initial value @off to @no. [breaking change]
  • Renamed lin/getoptions.sh to lin/getoptions_base.sh. [breaking change]
  • Moved library generation feature of getoptions to gengetoptions [breaking change]

Removed

  • Removed incomplete scanning modes =, #. [breaking change]
  • Removed getoptions-cli and replaced it with gengetoptions. [breaking change]
getoptions -

Published by ko1nksm almost 4 years ago

Changed

  • Add SC2034 to shellcheck directive in generated code

Fixed

  • Fixed a bug that omitting the value of key-value would be an incorrect value.
  • Fix handling of unknown short options in mode = and #.
getoptions -

Published by ko1nksm almost 4 years ago

Added

  • Added some options for /bin/getoptions.
  • Added scanning modes =, #, @.
getoptions -

Published by ko1nksm almost 4 years ago

Added

  • Added new /bin/getoptions (external command version for getoptions).

Changed

  • Renamed previous /bin/getoptions to /bin/getoptions-cli.
getoptions - v2.3.0

Published by ko1nksm almost 4 years ago

  • 2.3.0 - 2020-11-17
    • Added getoptions CLI (generator).
    • Fixed a bug that omitting the value of key-value would be an incorrect value.
getoptions -

Published by ko1nksm almost 4 years ago

  • 2.2.0 - 2020-11-14
    • Support for subcommands.
getoptions - v2.1.0

Published by ko1nksm almost 4 years ago

  • 2.1.0 - 2020-11-03
    • Support for abbreviating long options.
getoptions - v2.0.1

Published by ko1nksm almost 4 years ago

  • 2.0.1 - 2020-10-30
    • Add workaround for ksh88 (fixed only the test).
getoptions - v2.0.0

Published by ko1nksm almost 4 years ago

  • 2.0.0 - 2020-10-29
    • Improved the custom error handler. [breaking change]
      • The default error message is passed as the first argument, and changed the order of the arguments.
      • Adds :<PATTERN> to the validator name "pattern" for flexible customization of error message.
      • Adds :<STATUS> to the custom validator name for flexible customization of error message.
      • Changed the return value of custom error handler to be used as the exit status.
    • Invoke validator before pattern matching. [breaking change]
    • Added extension features (prehook and invoke).
    • setup helper function.
      • Added help and leading attributes.
        • Calling getoptions_help is no longer needed. [breaking change]
      • Remove equal attribute.
    • option helper function.
      • Changed the default attribute to the on attribute. [breaking change]
      • Added support --no-option syntax and the off attribute.
    • flag, param, option, disp and msg helper function.
      • Added label attribute.
    • setup, flag, param and option helper function.
      • Added @export as initial value.
    • Disable expansion variables in the help display. [breaking change]
getoptions -

Published by ko1nksm almost 4 years ago

  • 1.1.0 - 2020-10-21
    • Unset OPTARG when the option parser ends normally (#3 Cem Keylan)
    • Reset OPTIND to 1 when the option parser ends normally
    • Added @none as initial value
getoptions -

Published by ko1nksm about 4 years ago

  • 1.0.0 - 2020-08-20
    • First release version