# Flag

Specify flags (required or optional) used by your script.

The flag's value will be available to you as ${args[--output]} in your bash function (regardless of whether the user provided it with the long or short form).

bashly.yml
flags:
  - long: --ssh
    short: -s
    help: Clone using SSH.

  - long: --user
    short: -u
    arg: name
    help: Repository user name.
    required: true

# long

The long form of the flag.

# short

The short form of the flag.

# help

The text to display when using --help. Can have multiple lines.

# arg

If the flag requires an argument, specify its name here.

# required

Specify if this flag is required.

# default

The value to use in case it is not provided by the user. Implies that this flag is optional, and only makes sense when the flag has an argument.

Default Values Example

# allowed

Limit the allowed values. Can be used in conjunction with default and required.

Whitelist Example