File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -176,14 +176,14 @@ quote_readline()
176176_comp_dequote__initialize ()
177177{
178178 unset -f " $FUNCNAME "
179- local param =' \$([_a-zA-Z][_a-zA-Z0-9]*|[-*@#?$!0-9_])|\$\{[!#]?([_a-zA-Z][_a-zA-Z0-9]*(\[([0-9]+|[*@])\])?|[-*@#?$!0-9_])\}'
180- local quote =' \\.|' \' ' [^' \' ' ]*' \' ' |\$?"([^\"$`!]|' $param ' |\\.)*"|\$' \' ' ([^\' \' ' ]|\\.)*' \' ' '
181- _comp_dequote__regex_safe_word=' ^([^\' \' ' "$`;&|<>()!]|' $quote ' |' $param ' )*$'
179+ local regex_param =' \$([_a-zA-Z][_a-zA-Z0-9]*|[-*@#?$!0-9_])|\$\{[!#]?([_a-zA-Z][_a-zA-Z0-9]*(\[([0-9]+|[*@])\])?|[-*@#?$!0-9_])\}'
180+ local regex_quoted =' \\.|' \' ' [^' \' ' ]*' \' ' |\$?"([^\"$`!]|' $regex_param ' |\\.)*"|\$' \' ' ([^\' \' ' ]|\\.)*' \' ' '
181+ _comp_dequote__regex_safe_word=' ^([^\' \' ' "$`;&|<>()!]|' $regex_quoted ' |' $regex_param ' )*$'
182182}
183183_comp_dequote__initialize
184184
185185# This function expands a word using `eval` in a safe way. This function can
186- # be typically used to get the expqanded value of `${word[i]}` as
186+ # be typically used to get the expanded value of `${word[i]}` as
187187# `_comp_dequote "${word[i]}"`. When the word contains unquoted shell special
188188# characters, command substitutions, and other unsafe strings, the function
189189# call fails before applying `eval`. Otherwise, `eval` is applied to the
@@ -240,9 +240,9 @@ dequote()
240240{
241241 local ret
242242 _comp_dequote " $1 "
243- local ext =$?
243+ local rc =$?
244244 printf %s " $ret "
245- return $ext
245+ return $rc
246246}
247247
248248# Unset the given variables across a scope boundary. Useful for unshadowing
You can’t perform that action at this time.
0 commit comments