1
0
mirror of https://github.com/zplug/zplug synced 2024-09-28 06:59:42 +02:00

Improve regex pattern to match only modifiers

Modifiers need to be proceeded by a non-slash ("/") character.

    foo/(osx|darwin)

is not valid.
This commit is contained in:
Naoki Mizuno 2016-10-05 09:07:14 +09:00
parent c584c77d9c
commit f5d64506c6

View File

@ -184,7 +184,7 @@ __zplug::utils::shell::expand_glob()
local -a matches
# Modifiers not specified (by user)
if [[ ! $pattern =~ '\([^)]*\)$' ]]; then
if [[ ! $pattern =~ '[^/]\([^)]*\)$' ]]; then
pattern+="$default_modifiers"
fi