File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -110,3 +110,18 @@ enable_view_markers: development
110110enable_inspect_args : development
111111enable_deps_array : always
112112enable_env_var_names_array : always
113+
114+
115+ # -------------------------------------------------------------------------------
116+ # SCRIPTING OPTIONS
117+ # -------------------------------------------------------------------------------
118+
119+ # These are the public global variables available for use in your partial
120+ # scripts. Adding a new name here will create a reference variable using
121+ # `declare -gn`, allowing you to access the original variable under the new
122+ # name in addition to its original name.
123+ var_aliases :
124+ args : ~
125+ other_args : ~
126+ deps : ~
127+ env_var_names : ~
Original file line number Diff line number Diff line change @@ -22,7 +22,8 @@ class << self
2222 :strict ,
2323 :tab_indent ,
2424 :target_dir ,
25- :usage_colors
25+ :usage_colors ,
26+ :var_aliases
2627 )
2728
2829 def commands_dir
@@ -133,6 +134,10 @@ def usage_colors
133134 @usage_colors ||= get :usage_colors
134135 end
135136
137+ def var_aliases
138+ @var_aliases ||= get :var_aliases
139+ end
140+
136141 private
137142
138143 def get ( key )
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ if has_unique_args_or_flags?
2121 > declare -g -A unique_lookup=()
2222end
2323
24+ >
25+ Settings.var_aliases.each do |original, refname|
26+ if refname
27+ > declare -gn {{ refname }}={{ original }}
28+ end
29+ end
30+ >
2431> normalize_input "$@"
2532> parse_requirements "${input[@]}"
2633
You can’t perform that action at this time.
0 commit comments