@@ -51,7 +51,7 @@ command.catch_all:
51
51
- name: download
52
52
help: Download one or more URLs
53
53
54
- # Set to true to simply enable this option
54
+ # Set to ' true' to simply enable this option
55
55
catch_all: true
56
56
57
57
- name: upload
@@ -149,6 +149,82 @@ command.examples:
149
149
Upload a file (you will be prompted to provide a password)
150
150
$ cli upload profile.png --user admin
151
151
152
+ command.expose :
153
+ help : Specify that the sub-commands of this command should be visible when showing the usage of its parent.
154
+ url : https://bashly.dannyb.co/configuration/command/#expose
155
+ example : |-
156
+ name: cli
157
+ commands:
158
+ - name: config
159
+ help: Config management commands
160
+
161
+ # Set to 'true' to show both 'config edit' and 'config show' when
162
+ # running 'cli --help'
163
+ expose: true
164
+ commands:
165
+ - name: edit
166
+ help: Edit config file
167
+ - name: show
168
+ help: Show config file
169
+
170
+ - name: server
171
+ help: Server management commands
172
+
173
+ # Set to 'always' to also show the usage of the sub-commands when
174
+ # running 'cli' without arguments.
175
+ expose: always
176
+
177
+ commands:
178
+ - name: start
179
+ help: Start the server
180
+ - name: stop
181
+ help: Stop the server
182
+
183
+ command.extensible :
184
+ help : Specify that this command can be extended by external means.
185
+ url : https://bashly.dannyb.co/configuration/command/#extensible
186
+ example : |-
187
+ name: mygit
188
+ help: Wrapper for git
189
+ version: 0.1.0
190
+
191
+ # Set to 'true' to allow extending it by creating executables in the
192
+ # path named 'mygit-*'.
193
+ extensible: true
194
+
195
+ # Set to another executable name to delegate all unknown commands
196
+ # to it.
197
+ extensible: git
198
+
199
+ command.filename :
200
+ help : Specify the path (relative to src) to the partial source code file.
201
+ url : https://bashly.dannyb.co/configuration/command/#filename
202
+ example : |-
203
+ commands:
204
+ - name: connect
205
+ help: Connect to server
206
+ filename: admin_commands/list.sh
207
+
208
+ command.filters :
209
+ help : Specify a list of custom filter functions that will prevent the command from running unless certain conditions are met.
210
+ url : https://bashly.dannyb.co/configuration/command/#filters
211
+ example : |-
212
+ commands:
213
+ - name: container
214
+ help: Perform actions on a docker container
215
+
216
+ # When the command is executed, your script will look for a function
217
+ # named 'filter_docker_running' and execute it. If it prints a string,
218
+ # it will be considered an error and the command execution will be
219
+ # halted.
220
+ filters:
221
+ - docker_running
222
+
223
+ # Example function (put somewhere in src/lib)
224
+ filter_docker_running() {
225
+ docker info >/dev/null 2>&1 || echo "Docker must be running"
226
+ }
227
+
152
228
command.flags :
153
229
help : Define a list of option flags. See `flag` for reference.
154
230
url : https://bashly.dannyb.co/configuration/command/#flags
@@ -164,6 +240,27 @@ command.footer:
164
240
example : |-
165
241
footer: For further help visit https://my.docs-site.com
166
242
243
+ command.function :
244
+ help : Specify a different base function name for this command.
245
+ url : https://bashly.dannyb.co/configuration/command/#function
246
+ example : |-
247
+ commands:
248
+ - name: container-start
249
+ help: Start a new container (deprecated)
250
+
251
+ # Override the name of the internal functions bashly uses. This is
252
+ # needed in this case since the command 'container-start' and the
253
+ # nested command 'container start' will have the same underlying
254
+ # function name otherwise.
255
+ function: deprecated_container_start
256
+ footer: This command is deprecated, use 'container start' instead
257
+
258
+ - name: container
259
+ help: Container commands
260
+ commands:
261
+ - name: start
262
+ help: Start a new container
263
+
167
264
command.group :
168
265
help : Specify the group that this command belongs to.
169
266
url : https://bashly.dannyb.co/configuration/command/#group
@@ -195,6 +292,15 @@ command.name:
195
292
- name: images
196
293
help: Manage images
197
294
295
+ command.private :
296
+ help : Specify that this command should not be displayed in the help text.
297
+ url : https://bashly.dannyb.co/configuration/command/#private
298
+ example : |-
299
+ commands:
300
+ - name: completions
301
+ help: Send bash completions
302
+ private: true
303
+
198
304
command.version :
199
305
help : Specify the version to show when running with `--version`.
200
306
url : https://bashly.dannyb.co/configuration/command/#version
0 commit comments