File tree Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -126,3 +126,8 @@ var_aliases:
126126 other_args : ~
127127 deps : ~
128128 env_var_names : ~
129+
130+ # Choose different names for some of the internal functions.
131+ function_names :
132+ run : ~
133+ initialize : ~
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class << self
1515 :enable_inspect_args ,
1616 :enable_sourcing ,
1717 :enable_view_markers ,
18+ :function_names ,
1819 :lib_dir ,
1920 :partials_extension ,
2021 :private_reveal_key ,
@@ -89,6 +90,14 @@ def full_lib_dir
8990 "#{ source_dir } /#{ lib_dir } "
9091 end
9192
93+ def function_name ( key )
94+ function_names [ key . to_s ] || key . to_s
95+ end
96+
97+ def function_names
98+ @function_names ||= get :function_names
99+ end
100+
92101 def lib_dir
93102 @lib_dir ||= get :lib_dir
94103 end
Original file line number Diff line number Diff line change 11= view_marker
22
3- > initialize() {
3+ > {{ Settings.function_name : initialize }} () {
44> declare -g version="<%= version %>"
55> {{ Settings.strict_string }}
66
Original file line number Diff line number Diff line change 1515>
1616if Settings.enabled? :sourcing
1717 > if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
18- > initialize
19- > run "$@"
18+ > {{ Settings.function_name : initialize }}
19+ > {{ Settings.function_name : run }} "$@"
2020 > fi
2121else
22- > initialize
23- > run "$@"
22+ > {{ Settings.function_name : initialize }}
23+ > {{ Settings.function_name : run }} "$@"
2424end
2525>
Original file line number Diff line number Diff line change 11= view_marker
22
3- > run() {
3+ > {{ Settings.function_name : run }} () {
44= render(:globals).indent(2)
55>
66> normalize_input "$@"
You can’t perform that action at this time.
0 commit comments