File tree Expand file tree Collapse file tree 4 files changed +33
-2
lines changed
Expand file tree Collapse file tree 4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,12 @@ flags:
4040 arg : path
4141 help : Path to log file
4242
43- # Arguments in argfile also work for repeatable flags
43+ # Arguments in argfile also work for repeatable and unique flags
4444- long : --header
4545 short : -H
4646 arg : value
4747 repeatable : true
48+ unique : true
4849 help : Add an HTTP header
4950` ` ` `
5051
@@ -127,5 +128,21 @@ args:
127128
128129````
129130
131+ ### ` $ ./download somesource --header "x-from-file: 1" `
132+
133+ ```` shell
134+ # This file is located at 'src/root_command.sh'.
135+ # It contains the implementation for the 'download' command.
136+ # The code you write here will be wrapped by a function named 'root_command()'.
137+ # Feel free to edit this file; your changes will persist when regenerating.
138+ args:
139+ - ${args[--force]} = 1
140+ - ${args[--header]} = x-from-file:\ 1
141+ - ${args[--log]} = some path with spaces.log
142+ - ${args[source]} = somesource
143+
144+
145+ ````
146+
130147
131148
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ flags:
1919 arg : path
2020 help : Path to log file
2121
22- # Arguments in argfile also work for repeatable flags
22+ # Arguments in argfile also work for repeatable and unique flags
2323- long : --header
2424 short : -H
2525 arg : value
2626 repeatable : true
27+ unique : true
2728 help : Add an HTTP header
Original file line number Diff line number Diff line change @@ -12,3 +12,6 @@ bashly generate
1212./download somesource
1313./download somesource --log cli.log
1414./download somesource --header " x-from-cli: 2"
15+
16+ # demonstrating uniqueness across command line and argfile
17+ ./download somesource --header " x-from-file: 1"
Original file line number Diff line number Diff line change 3535- ${args[--header]} = x-from-file:\ 1 x-from-cli:\ 2
3636- ${args[--log]} = some path with spaces.log
3737- ${args[source]} = somesource
38+ + ./download somesource --header 'x-from-file: 1'
39+ # This file is located at 'src/root_command.sh'.
40+ # It contains the implementation for the 'download' command.
41+ # The code you write here will be wrapped by a function named 'root_command()'.
42+ # Feel free to edit this file; your changes will persist when regenerating.
43+ args:
44+ - ${args[--force]} = 1
45+ - ${args[--header]} = x-from-file:\ 1
46+ - ${args[--log]} = some path with spaces.log
47+ - ${args[source]} = somesource
You can’t perform that action at this time.
0 commit comments