File tree Expand file tree Collapse file tree 7 files changed +78
-0
lines changed
fixtures/workspaces/no-compact-flags Expand file tree Collapse file tree 7 files changed +78
-0
lines changed Original file line number Diff line number Diff line change
1
+ creating user files in src
2
+ skipped src/initialize.sh (exists)
3
+ skipped src/root_command.sh (exists)
4
+ created ./cli
5
+ run ./cli --help to test your bash script
6
+ + ./cli -abc --delta
7
+ # this file is located in 'src/root_command.sh'
8
+ # you can edit it freely and regenerate (it will not be overwritten)
9
+ args:
10
+ - ${args[--alpha]} = 1
11
+ - ${args[--bravo]} = 1
12
+ - ${args[--charlie]} = 1
13
+ - ${args[--delta]} = 1
14
+ + BASHLY_COMPACT_SHORT_FLAGS=no
15
+ + bundle exec bashly generate
16
+ creating user files in src
17
+ skipped src/initialize.sh (exists)
18
+ skipped src/root_command.sh (exists)
19
+ created ./cli
20
+ run ./cli --help to test your bash script
21
+ + ./cli -abc --delta
22
+ invalid option: -abc
23
+ + ./cli -a -b -c
24
+ # this file is located in 'src/root_command.sh'
25
+ # you can edit it freely and regenerate (it will not be overwritten)
26
+ args:
27
+ - ${args[--alpha]} = 1
28
+ - ${args[--bravo]} = 1
29
+ - ${args[--charlie]} = 1
Original file line number Diff line number Diff line change
1
+ cli
Original file line number Diff line number Diff line change
1
+ This fixture tests that setting ` compact_short_flags ` to ` false ` indeed ignores
2
+ this ` -abc ` pattern.
Original file line number Diff line number Diff line change
1
+ name : cli
2
+ help : Sample application
3
+ version : 0.1.0
4
+
5
+ flags :
6
+ - long : --alpha
7
+ short : -a
8
+ help : Alpha
9
+ - long : --bravo
10
+ short : -b
11
+ help : Bravo
12
+ - long : --charlie
13
+ short : -c
14
+ help : Charlie
15
+ - long : --delta
16
+ short : -d
17
+ help : Delta
18
+
19
+
20
+
21
+
Original file line number Diff line number Diff line change
1
+ # # Code here runs inside the initialize() function
2
+ # # Use it for anything that you need to run before any other function, like
3
+ # # setting environment variables:
4
+ # # CONFIG_FILE=settings.ini
5
+ # #
6
+ # # Feel free to empty (but not delete) this file.
Original file line number Diff line number Diff line change
1
+ echo " # this file is located in 'src/root_command.sh'"
2
+ echo " # you can edit it freely and regenerate (it will not be overwritten)"
3
+ inspect_args
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # This fixture tests that setting `compact_short_flags` to `false` indeed ignores
4
+ # this `-abc` pattern.
5
+
6
+ bundle exec bashly generate
7
+
8
+ set -x
9
+
10
+ ./cli -abc --delta
11
+
12
+ # Use ad-hoc setting through an environment variable
13
+ BASHLY_COMPACT_SHORT_FLAGS=" no" bundle exec bashly generate
14
+
15
+ ./cli -abc --delta
16
+ ./cli -a -b -c
You can’t perform that action at this time.
0 commit comments