diff --git a/hsmw-highlight b/hsmw-highlight index 76175e5..c7c4b6d 100644 --- a/hsmw-highlight +++ b/hsmw-highlight @@ -442,7 +442,8 @@ typeset -gA HSMW_HIGHLIGHT_STYLES function) style=function;; command) style=command;; hashed) style=hashed-command;; - none) if -hsmw-highlight-check-assign; then + none) # Assign? + if [[ $arg == [[:alpha:]_][[:alnum:]_]#(|\[*\])(|[+])=* ]] || [[ $arg == [0-9]##(|[+])=* ]]; then style=assign if [[ $arg[-1] == '(' ]]; then in_array_assignment=true @@ -621,14 +622,6 @@ typeset -gA HSMW_HIGHLIGHT_STYLES done } -# Check if $arg is variable assignment --hsmw-highlight-check-assign() -{ - setopt localoptions extended_glob - [[ $arg == [[:alpha:]_][[:alnum:]_]#(|\[*\])(|[+])=* ]] || - [[ $arg == [0-9]##(|[+])=* ]] -} - -hsmw-highlight-path-separators() { local pos style_pathsep