Skip to content

Commit 22fd1c4

Browse files
committed
add environment variable example
1 parent 2713033 commit 22fd1c4

File tree

19 files changed

+382
-25
lines changed

19 files changed

+382
-25
lines changed

Runfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def examples
3535
"examples/minimal/download",
3636
"examples/multiline/multi",
3737
"examples/subcommands/cli",
38+
"examples/environment-variables/cli",
3839
"examples/yaml/yaml",
3940
"spec/fixtures/workspaces/short-flag/rush",
4041
]

examples/colors/colorly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ cyan_underlined() { echo -e "\e[4;36m$*\e[0m" ; }
101101

102102
# :command.parse_requirements
103103
parse_requirements() {
104-
# :command.environment_variables_filter
105104
# :command.fixed_flag_filter
106105
case "$1" in
107106
--version )
@@ -116,6 +115,7 @@ parse_requirements() {
116115
;;
117116

118117
esac
118+
# :command.environment_variables_filter
119119
# :command.command_filter
120120
action="root"
121121
# :command.required_args_filter

examples/config-ini/configly

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ configly_list_command() {
276276

277277
# :command.parse_requirements
278278
parse_requirements() {
279-
# :command.environment_variables_filter
280279
# :command.fixed_flag_filter
281280
case "$1" in
282281
--version )
@@ -291,6 +290,7 @@ parse_requirements() {
291290
;;
292291

293292
esac
293+
# :command.environment_variables_filter
294294
# :command.command_filter
295295
action=$1
296296

@@ -349,7 +349,6 @@ parse_requirements() {
349349

350350
# :command.parse_requirements
351351
configly_set_parse_requirements() {
352-
# :command.environment_variables_filter
353352
# :command.fixed_flag_filter
354353
case "$1" in
355354
--version )
@@ -364,6 +363,7 @@ configly_set_parse_requirements() {
364363
;;
365364

366365
esac
366+
# :command.environment_variables_filter
367367
# :command.command_filter
368368
action="set"
369369
# :command.required_args_filter
@@ -413,7 +413,6 @@ configly_set_parse_requirements() {
413413

414414
# :command.parse_requirements
415415
configly_get_parse_requirements() {
416-
# :command.environment_variables_filter
417416
# :command.fixed_flag_filter
418417
case "$1" in
419418
--version )
@@ -428,6 +427,7 @@ configly_get_parse_requirements() {
428427
;;
429428

430429
esac
430+
# :command.environment_variables_filter
431431
# :command.command_filter
432432
action="get"
433433
# :command.required_args_filter
@@ -466,7 +466,6 @@ configly_get_parse_requirements() {
466466

467467
# :command.parse_requirements
468468
configly_list_parse_requirements() {
469-
# :command.environment_variables_filter
470469
# :command.fixed_flag_filter
471470
case "$1" in
472471
--version )
@@ -481,6 +480,7 @@ configly_list_parse_requirements() {
481480
;;
482481

483482
esac
483+
# :command.environment_variables_filter
484484
# :command.command_filter
485485
action="list"
486486
# :command.required_args_filter

examples/custom-includes/download

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ my_extra_function() {
7373

7474
# :command.parse_requirements
7575
parse_requirements() {
76-
# :command.environment_variables_filter
7776
# :command.fixed_flag_filter
7877
case "$1" in
7978
--version )
@@ -88,6 +87,7 @@ parse_requirements() {
8887
;;
8988

9089
esac
90+
# :command.environment_variables_filter
9191
# :command.command_filter
9292
action="root"
9393
# :command.required_args_filter

examples/custom-strings/download

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ inspect_args() {
6868

6969
# :command.parse_requirements
7070
parse_requirements() {
71-
# :command.environment_variables_filter
7271
# :command.fixed_flag_filter
7372
case "$1" in
7473
--version )
@@ -83,6 +82,7 @@ parse_requirements() {
8382
;;
8483

8584
esac
85+
# :command.environment_variables_filter
8686
# :command.command_filter
8787
action="root"
8888
# :command.required_args_filter

examples/docker-like/docker

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ docker_image_ls_command() {
222222

223223
# :command.parse_requirements
224224
parse_requirements() {
225-
# :command.environment_variables_filter
226225
# :command.fixed_flag_filter
227226
case "$1" in
228227
--version )
@@ -237,6 +236,7 @@ parse_requirements() {
237236
;;
238237

239238
esac
239+
# :command.environment_variables_filter
240240
# :command.command_filter
241241
action=$1
242242

@@ -288,7 +288,6 @@ parse_requirements() {
288288

289289
# :command.parse_requirements
290290
docker_container_parse_requirements() {
291-
# :command.environment_variables_filter
292291
# :command.fixed_flag_filter
293292
case "$1" in
294293
--version )
@@ -303,6 +302,7 @@ docker_container_parse_requirements() {
303302
;;
304303

305304
esac
305+
# :command.environment_variables_filter
306306
# :command.command_filter
307307
action=$1
308308

@@ -354,7 +354,6 @@ docker_container_parse_requirements() {
354354

355355
# :command.parse_requirements
356356
docker_container_run_parse_requirements() {
357-
# :command.environment_variables_filter
358357
# :command.fixed_flag_filter
359358
case "$1" in
360359
--version )
@@ -369,6 +368,7 @@ docker_container_run_parse_requirements() {
369368
;;
370369

371370
esac
371+
# :command.environment_variables_filter
372372
# :command.command_filter
373373
action="container run"
374374
# :command.required_args_filter
@@ -407,7 +407,6 @@ docker_container_run_parse_requirements() {
407407

408408
# :command.parse_requirements
409409
docker_container_stop_parse_requirements() {
410-
# :command.environment_variables_filter
411410
# :command.fixed_flag_filter
412411
case "$1" in
413412
--version )
@@ -422,6 +421,7 @@ docker_container_stop_parse_requirements() {
422421
;;
423422

424423
esac
424+
# :command.environment_variables_filter
425425
# :command.command_filter
426426
action="container stop"
427427
# :command.required_args_filter
@@ -460,7 +460,6 @@ docker_container_stop_parse_requirements() {
460460

461461
# :command.parse_requirements
462462
docker_image_parse_requirements() {
463-
# :command.environment_variables_filter
464463
# :command.fixed_flag_filter
465464
case "$1" in
466465
--version )
@@ -475,6 +474,7 @@ docker_image_parse_requirements() {
475474
;;
476475

477476
esac
477+
# :command.environment_variables_filter
478478
# :command.command_filter
479479
action=$1
480480

@@ -519,7 +519,6 @@ docker_image_parse_requirements() {
519519

520520
# :command.parse_requirements
521521
docker_image_ls_parse_requirements() {
522-
# :command.environment_variables_filter
523522
# :command.fixed_flag_filter
524523
case "$1" in
525524
--version )
@@ -534,6 +533,7 @@ docker_image_ls_parse_requirements() {
534533
;;
535534

536535
esac
536+
# :command.environment_variables_filter
537537
# :command.command_filter
538538
action="image ls"
539539
# :command.required_args_filter
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Environment Variables Example
2+
==================================================
3+
4+
This example was generated with:
5+
6+
$ bashly init
7+
$ bashly generate

0 commit comments

Comments
 (0)