-
-
Notifications
You must be signed in to change notification settings - Fork 30
Description
I just grabbed one of your examples and introduced a line, but I am getting an error I can't understand, nor did I find any explanation online about it.
`
parser_definition() {
setup REST help:usage -- "Usage: $0 [options]... [arguments]..." ''
msg -- 'Options:'
flag FLAG -f --flag -- "takes no arguments"
param PARAM -p --param -- "takes one argument"
source SOURCE -s --source -- "takes one argument <- this is the 'problematic' line "
option OPTION -o --option on:"default" -- "takes one optional argument"
disp :usage --help
disp VERSION --version
}
eval "$(getoptions parser_definition) exit 1"
echo "FLAG: $FLAG, PARAM: $PARAM, OPTION: $OPTION"
printf '%s\n' "$@" # rest arguments
`
basically I need to get two mandatory name parameters and one optional.