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
110
110
enable_inspect_args : development
111
111
enable_deps_array : always
112
112
enable_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
22
22
:strict ,
23
23
:tab_indent ,
24
24
:target_dir ,
25
- :usage_colors
25
+ :usage_colors ,
26
+ :var_aliases
26
27
)
27
28
28
29
def commands_dir
@@ -133,6 +134,10 @@ def usage_colors
133
134
@usage_colors ||= get :usage_colors
134
135
end
135
136
137
+ def var_aliases
138
+ @var_aliases ||= get :var_aliases
139
+ end
140
+
136
141
private
137
142
138
143
def get ( key )
Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ if has_unique_args_or_flags?
21
21
> declare -g -A unique_lookup=()
22
22
end
23
23
24
+ >
25
+ Settings.var_aliases.each do |original, refname|
26
+ if refname
27
+ > declare -gn {{ refname }}={{ original }}
28
+ end
29
+ end
30
+ >
24
31
> normalize_input "$@"
25
32
> parse_requirements "${input[@]}"
26
33
You can’t perform that action at this time.
0 commit comments