Merge pull request #1289 from zsh-users/do-not-overwrite-match-arrays
Declare match, mbegin, mend arrays when using regexp
This commit is contained in:
commit
2798b16c74
|
|
@ -84,7 +84,8 @@ _arguments \
|
|||
_chromium_proxyurls () {
|
||||
#TODO: semicolon separated urls not yet implemented
|
||||
# mostly copied from _urls
|
||||
local ipre scheme host user uhosts ret=1 expl match glob suf
|
||||
local ipre scheme host user uhosts ret=1 expl glob suf
|
||||
local -a match mbegin mend
|
||||
local localhttp
|
||||
zstyle -a ":completion:${curcontext}:urls" local localhttp
|
||||
local localhttp_servername="$localhttp[1]"
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ _cmake_build_presets() {
|
|||
(( $+functions[_cmake_json_field] )) ||
|
||||
_cmake_json_field() {
|
||||
local json="$1" key="$2"
|
||||
local -a match mbegin mend
|
||||
# Non-greedy match of: "key" <ws> : <ws> " value "
|
||||
if [[ $json =~ "\"$key\"[[:space:]]*:[[:space:]]*\"([^\"]*)\"" ]]; then
|
||||
print -r -- "$match[1]"
|
||||
|
|
@ -213,6 +214,7 @@ _cmake_json_inherited_field() {
|
|||
fi
|
||||
|
||||
local parent
|
||||
local -a match mbegin mend
|
||||
if [[ $block =~ '"inherits"[[:space:]]*:[[:space:]]*\[([^]]*)\]' ]]; then
|
||||
for parent in ${(s:,:)match[1]}; do
|
||||
parent=${parent//[\"[:space:]]/}
|
||||
|
|
|
|||
|
|
@ -346,6 +346,7 @@ __git_flow_feature_list() {
|
|||
|
||||
__git_flow_remote() {
|
||||
local expl gitdir remotes
|
||||
local -a match mbegin mend
|
||||
|
||||
gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
|
||||
__git_flow_command_successful || return
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ while (( $#state )); do
|
|||
;;
|
||||
query)
|
||||
|
||||
local -a accs keywords
|
||||
local -a accs keywords match mbegin mend
|
||||
keywords=(
|
||||
'acct\::match account names'
|
||||
'code\::match by transaction code'
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
|
||||
_httpie_params() {
|
||||
local ret=1 expl
|
||||
local -a match mbegin mend
|
||||
|
||||
# or a url
|
||||
if (( CURRENT <= NORMARG+1 )) && [[ $words[NORMARG] != *:* ]] ; then
|
||||
|
|
@ -123,6 +124,7 @@ _httpie_urls() {
|
|||
|
||||
_httpie_printflags() {
|
||||
local ret=1
|
||||
local -a match mbegin mend
|
||||
|
||||
# not sure why this is necessary, but it will complete "-pH" style without it
|
||||
[[ $IPREFIX == "-p" ]] && IPREFIX+=" "
|
||||
|
|
|
|||
Loading…
Reference in New Issue