Releases: sigoden/argc
Releases · sigoden/argc
v0.7.0
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
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
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
v0.3.2
v0.3.1
v0.3.0
v0.2.3
v0.2.2
v0.2.1
chore: Bump version