Skip to content

... 15: eval: source: not found ... #63

@Albretch

Description

@Albretch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions