Improve regex for simple and braced variable detection

This commit is contained in:
tsi 2026-01-03 01:23:43 +01:00
parent 43f68fefd3
commit c2bf5cec36
No known key found for this signature in database

View file

@ -150,8 +150,8 @@ _redir_or_assign_word () {
_double_quoted_string='\$?"([^"]|\\")*"' \ _double_quoted_string='\$?"([^"]|\\")*"' \
_single_quoted_string="\\\$?'[^']*'" \ _single_quoted_string="\\\$?'[^']*'" \
_backtick_string='`([^`]|\\`)*`' \ _backtick_string='`([^`]|\\`)*`' \
_simple_variable='\$[[:alpha:]_][[:alnum:]]*' \ _simple_variable='\$([[:alpha:]_][[:alnum:]]*|[-_$!*#[:digit:]])' \
_advanced_variable='\$\{([[:alnum:]]+|[#-_$!*#])[^{}]*\}' \ _advanced_variable='\$\{([[:alpha:]_][[:alnum:]]*|[-_$!*#[:digit:]])[^}]*\}' \
_deprecated_arithmetic_eval='\$\[[^][]*\]' \ _deprecated_arithmetic_eval='\$\[[^][]*\]' \
_cmd_subst_or_arithmetic_eval='\$\([^()]*\)' \ _cmd_subst_or_arithmetic_eval='\$\([^()]*\)' \
_process_substition='<\([^()]*\)' \ _process_substition='<\([^()]*\)' \