Skip to content

Flags with arguments consume other flags instead of erroring #89

@DannyBen

Description

@DannyBen

Bashly config:

name: download
version: 0.1.0

flags:
- long: --path
  arg: path
  help: path to directory
  default: somedir
- long: --other
  help: test some flag

Expected behavior

$ ./download --path --other
--path requires an argument: --path PATH

Actual behavior

$ ./download --path --other
args:
- ${args[--path]} = --other

Notes

Implementing this will probably mean checking for the supplied flag argument, and if it starts with a hyphen (-), assume it is another flag and disallow it. Therefore, need to consider this downside before implementing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions