Skip to content

Commit

Permalink
Add condition that path_approx should be highlighted only if $#arg > …
Browse files Browse the repository at this point in the history
…3, otherwise it matches too many things. (but do we need path_approx at all?)
  • Loading branch information
jimmijj committed Oct 3, 2014
1 parent 4a82aab commit 6d9a340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion highlighters/main/main-highlighter.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ _zsh_highlight_main_highlighter_check_path()
(( $#tmp > 0 )) && style_override=path_prefix && return 0
# or maybe an approximate path?
tmp=( (#a1)${expanded_path}*(N) )
(( $#tmp > 0 )) && style_override=path_approx && return 0
(( $#arg > 3 && $#tmp > 0 )) && style_override=path_approx && return 0
fi
return 1
}
Expand Down

0 comments on commit 6d9a340

Please sign in to comment.