File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
lib/bashly/libraries/render Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ if flags.any?
127127 if flag.conflicts
128128 > - Conflicts With: **{{ flag.conflicts.join(', ') }}**
129129 end
130+ if flag.needs
131+ > - Needs: **{{ flag.needs.join(', ') }}**
132+ end
130133 >
131134 end
132135end
Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ if flags.any?
152152 > ## Options
153153 >
154154 flags.each do |flag|
155- attributes = flag.required || flag.repeatable || flag.default || flag.allowed || flag.conflicts
155+ attributes = flag.required || flag.repeatable || flag.default ||
156+ flag.allowed || flag.conflicts || flag.needs
156157
157158 > #### *{{ flag.usage_string }}*
158159 >
@@ -177,6 +178,9 @@ if flags.any?
177178 if flag.conflicts
178179 > | Conflicts With: | *{{ flag.conflicts.join(', ') }}*
179180 end
181+ if flag.needs
182+ > | Needs: | *{{ flag.needs.join(', ') }}*
183+ end
180184 >
181185 end
182186 end
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ skipped src/root_command.sh (exists)
44created ./cli
55run ./cli --help to test your bash script
66+ ./cli -h
7- cli - Sample application to demonstrate the use of conflicting flags
7+ cli - Sample application to demonstrate the use of needy flags
88
99Usage:
1010 cli [OPTIONS]
You can’t perform that action at this time.
0 commit comments