Skip to content

Releases: sigoden/argc

v0.7.0

14 Mar 01:39
Compare
Choose a tag to compare

What's Changed

  • feat: less constrained on cmd name by @sigoden in #18
    cmd/fn name can contain many other characters.
# @cmd
foo_bar() {
    echo "foo_bar"
}
# @cmd
foo-bar() {
    echo "foo-bar"
}
# @cmd
foo.bar() {
    echo "foo.bar"
}
# @cmd
foo@bar() {
    echo "foo@bar"
}
# @cmd
foo:bar() {
    echo "foo:bar"
}

eval "$(argc $0 "$@")"

Full Changelog: v0.6.0...v0.7.0

v0.6.0

13 Mar 14:05
Compare
Choose a tag to compare

What's Changed

  • feat: add default positional arg by @sigoden in #15
  • feat: also pass shell positional parameters to fn by @sigoden in #16
  • feat: no need to explicitly pass -e option by @sigoden in #17

The code below reflects these changes

# @cmd
cmd() {
  echo "\$argc__args:" ${argc__args[@]}   # default positional parameters will be collected to argc_args 
  echo "\$@:" $@                          # argc pass shell positional parameters to fn 
}

eval "$(argc $0 "$@")"                    # no need to explicitly pass -e

Full Changelog: v0.5.0...v0.6.0

v0.5.0

12 Mar 00:36
Compare
Choose a tag to compare

Breaking Changes

adjust generated name by @sigoden in #14

This only affect parameter with number suffix.

In prev version, generate names:

value name: --opt1 => OPT_1
variable name: --opt1 => argc_opt_1
cmd name: cmd1 => cmd_1

In this version, generated names:

value name: --opt1 => OPT1
variable name: --opt1 => argc_opt1
cmd name: cmd1 => cmd1

Full Changelog: v0.4.0...v0.5.0

v0.4.0

07 Mar 00:28
Compare
Choose a tag to compare

New Features

Full Changelog: v0.3.2...v0.4.0

v0.3.2

06 Mar 22:35
Compare
Choose a tag to compare

Fixes

  • duplicate non-ascii chars

Full Changelog: v0.3.1...v0.3.2

v0.3.1

06 Mar 15:27
Compare
Choose a tag to compare

Fixes

Full Changelog: v0.3.0...v0.3.1

v0.3.0

06 Mar 06:37
Compare
Choose a tag to compare

New Features

Full Changelog: v0.2.3...v0.3.0

v0.2.3

05 Mar 03:11
Compare
Choose a tag to compare

Bug Fixes

v0.2.2

03 Mar 07:40
Compare
Choose a tag to compare

Bug Fixes

  • Display help message when miss required args (107ba7f0)

Documentation Changes

v0.2.1

25 Feb 00:51
Compare
Choose a tag to compare
chore: Bump version