Allow arithmetic expansions
This commit is contained in:
parent
c2bf5cec36
commit
275a1ccd84
1 changed files with 4 additions and 2 deletions
|
|
@ -153,7 +153,8 @@ _redir_or_assign_word () {
|
|||
_simple_variable='\$([[:alpha:]_][[:alnum:]]*|[-_$!*#[:digit:]])' \
|
||||
_advanced_variable='\$\{([[:alpha:]_][[:alnum:]]*|[-_$!*#[:digit:]])[^}]*\}' \
|
||||
_deprecated_arithmetic_eval='\$\[[^][]*\]' \
|
||||
_cmd_subst_or_arithmetic_eval='\$\([^()]*\)' \
|
||||
_cmd_subst='\$\([^()]*\)' \
|
||||
_arithmetic_eval='\$\(\([^()]*\)\)' \
|
||||
_process_substition='<\([^()]*\)' \
|
||||
_escaped_char='\\.'
|
||||
declare _part="$_simple_unquoted_word"
|
||||
|
|
@ -163,7 +164,8 @@ _redir_or_assign_word () {
|
|||
_part+="|$_simple_variable"
|
||||
_part+="|$_advanced_variable"
|
||||
_part+="|$_deprecated_arithmetic_eval"
|
||||
_part+="|$_cmd_subst_or_arithmetic_eval"
|
||||
_part+="|$_cmd_subst"
|
||||
_part+="|$_arithmetic_eval"
|
||||
_part+="|$_process_substition"
|
||||
_part+="|$_escaped_char"
|
||||
declare -r _word="($_part)+" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue