Skip to content

Add defaults to parse_params() #9

Description

@bbros-dev

Taking on board the feedback in PR #8, I'm feeding back some changes I've found useful.

For consideration:

# DESC: Variable defaults
# ARGS: None.
# OUTS: Variables with default values set.
function defaults() {
  verbose=false no_colour=false cron=false outfile=-
}

...

function parse_params() {
....
  local param
  defaults
  # now enjoy the options in order and nicely split until we see --
....

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions