File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ module Bashly
22 module Script
33 module Introspection
44 module Commands
5+ def catch_all_used_anywhere?
6+ deep_commands ( include_self : true ) . any? { |x | x . catch_all . enabled? }
7+ end
8+
59 # Returns a full list of the Command names and aliases combined
610 def command_aliases
711 commands . map ( &:aliases ) . flatten
Original file line number Diff line number Diff line change 1111> echo args: none
1212> fi
1313>
14+
15+ if catch_all_used_anywhere?
1416> if ((${#other_args[@]})); then
1517> echo
1618> echo other_args:
2022> done
2123> fi
2224>
25+ end
26+
2327if Settings.enabled? :deps_array
2428 > if ((${#deps[@]})); then
2529 > readarray -t sorted_keys < <(printf '%s\n' "${!deps[@]}" | sort)
@@ -31,6 +35,7 @@ if Settings.enabled? :deps_array
3135 > fi
3236 >
3337end
38+
3439if Settings.enabled? :env_var_names_array
3540 > if ((${#env_var_names[@]})); then
3641 > readarray -t sorted_names < <(printf '%s\n' "${env_var_names[@]}" | sort)
Original file line number Diff line number Diff line change 22
33> run() {
44> declare -g -A args=()
5- unless Settings.enabled? :inspect_args
6- > # shellcheck disable=SC2034
5+
6+ if catch_all_used_anywhere?
7+ > declare -g -a other_args=()
78end
8- > declare -g -a other_args=()
99
1010if Settings.enabled? :deps_array
1111 > declare -g -A deps=()
You can’t perform that action at this time.
0 commit comments