Options should only be set locally

This commit is contained in:
Julien Nicoulaud 2011-09-24 14:42:55 +02:00
parent 024c1c46f7
commit f824e5e84d

View File

@ -153,7 +153,7 @@ _zsh_highlight_main_highlighter_check_assign()
# Check if the argument is a path. # Check if the argument is a path.
_zsh_highlight_main_highlighter_check_path() _zsh_highlight_main_highlighter_check_path()
{ {
setopt nonomatch setopt localoptions nonomatch
local expanded_path; : ${expanded_path:=${(Q)~arg}} local expanded_path; : ${expanded_path:=${(Q)~arg}}
[[ -z $expanded_path ]] && return 1 [[ -z $expanded_path ]] && return 1
[[ -e $expanded_path ]] && return 0 [[ -e $expanded_path ]] && return 0