diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh
index 6af3f9d32..aa50589a0 100644
--- a/highlighters/main/main-highlighter.zsh
+++ b/highlighters/main/main-highlighter.zsh
@@ -628,18 +628,27 @@ _zsh_highlight_main_highlighter_highlight_list()
          (( ${+parameters[(e)${MATCH}]} )) && [[ ${parameters[(e)$MATCH]} != *special* ]]
          then
         # Set $arg.
+        local -a words
+        local testarg
         case ${(tP)MATCH} in
           (*array*|*assoc*)
-            local -a words; words=( ${(P)MATCH} )
-            arg=${words[1]}
+            words=( ${(P)MATCH} )
+            testarg=${words[1]}
             ;;
           (*)
             # scalar, presumably
-            arg=${(P)MATCH}
+            words=( ${(zP)MATCH} )
+            testarg=${words[1]}
             ;;
         esac
-        _zsh_highlight_main__type "$arg" 0
-        res=$REPLY
+        _zsh_highlight_main__type "$testarg" 0
+        if [[ -n $REPLY ]] && [[ $REPLY != none ]]; then
+            res=$REPLY
+            arg=$testarg
+        elif _zsh_highlight_main_highlighter_check_path $testarg; then
+            res=none
+            arg=$testarg
+        fi
       fi
     }