File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,30 +55,18 @@ function helper::get_functions_to_run() {
5555 local filter=$2
5656 local function_names=$3
5757
58- local functions_to_run=()
59-
60- for function_name in $function_names ; do
61- if [[ $function_name != ${prefix} * ]]; then
62- continue
63- fi
64-
65- local lower_case_function_name
66- lower_case_function_name=$( echo " $function_name " | tr ' [:upper:]' ' [:lower:]' )
67- local lower_case_filter
68- lower_case_filter=$( echo " $filter " | tr ' [:upper:]' ' [:lower:]' )
69-
70- if [[ -n $filter && $lower_case_function_name != * " $lower_case_filter " * ]]; then
71- continue
58+ local filtered_functions=" "
59+
60+ for fn in $function_names ; do
61+ if [[ $fn == ${prefix} _${filter} * ]]; then
62+ if [[ $filtered_functions == * " $fn " * ]]; then
63+ return 1
64+ fi
65+ filtered_functions+=" $fn "
7266 fi
73-
74- if [[ " ${functions_to_run[*]} " =~ ${function_name} ]]; then
75- return 1
76- fi
77-
78- functions_to_run+=(" $function_name " )
7967 done
8068
81- echo " ${functions_to_run[@] } "
69+ echo " ${filtered_functions # } "
8270}
8371
8472#
You can’t perform that action at this time.
0 commit comments