You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .milpa/docs/milpa/command/spec.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,8 +80,8 @@ The `arguments` list describes the positional arguments that may be passed to a
80
80
arguments:
81
81
# available in to the command as the MILPA_ARG_INCREMENT environment variable
82
82
- name: increment
83
-
# this description shows up during auto-completion and in the command's help page
84
-
descrption: the increment to apply to the last git version
83
+
# this description shows up when rendering the command's help
84
+
description: the increment to apply to the last git version
85
85
# a default may be specified, it'll be passed to your command if none is provided
86
86
default: patch
87
87
# if marked as required, the command won't run unless this argument is provided
@@ -99,7 +99,7 @@ arguments:
99
99
100
100
## Options
101
101
102
-
The `options` map describes the named options that may be passed to a command. Options require a `name` and a `description`. The `name` of the option will become available to commands through the environment variable named `MILPA_OPT_$NAME` where `$NAME` means the uppercased value of key for an option. For example, an option at the key `scheme` will be available as your command's environment variable `MILPA_OPT_SCHEME`.
102
+
The `options` map describes the named options that may be passed to a command (i.e. `--name value`). Options require a `name` and a `description`. The `name` of the option will become available to commands through the environment variable named `MILPA_OPT_$NAME` where `$NAME` means the uppercased value of key for an option. For example, an option at the key `scheme` will be available as your command's environment variable `MILPA_OPT_SCHEME`.
103
103
104
104
> ⚠️ Options are not available as positional arguments to your command. The same character restrictions as arguments apply to options.
105
105
@@ -110,20 +110,22 @@ options:
110
110
# it will be available to your script as the $MILPA_OPT_SCHEME environment variable
111
111
# and may be specified on the command line as either `--scheme "semver"` or `--scheme=semver`.
112
112
scheme:
113
-
# options require a description, this will show during completions
114
-
# and on the command's help page
113
+
# options require a description, this will show when rendering the command's help
115
114
description: Determines the format of the tags for this repo.
116
115
# Sometimes, very commonly used flags might benefit from setting a short name
117
116
# in this case, users would be able to use `-s calver`
118
117
short-name: s
119
118
# a default value may be passed to the command if none is provided by the user
120
119
default: semver
121
-
# the values provided at the command line
122
120
# flags can be boolean. Since environment variables can only be strings,
123
121
# false values (the default) will be passed as an empty string "", while
124
122
# true values will be passed as the string "true"
125
-
type: bool # or `string`
123
+
type: string # or `bool`
124
+
# string flags may be repeated multiple times
125
+
# should an option be repeated, it's `default:` then must also be a list!
126
+
repeated: false
126
127
# the `values` property specifies how to provide completions and perform validation on
0 commit comments