From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14675 invoked by alias); 17 Aug 2015 22:04:01 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36208 Received: (qmail 12750 invoked from network); 17 Aug 2015 22:04:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=gXK L2FMzwdnG6SFnsI5zE0u9rYw=; b=pHJl7CpGGU05CU7YFicvfLmA89X6toIXMfa c/kQ5l6T7eKO1HUb63Wqff5Y+mDmNpceFx+2KwteQupVlT+z0Dq1+5AAljqiuSA+ QPSTRApChl4lYat8x7rDtinZVlqHhFPw+T1P73ihL7OFnkucImaIkuE+Xt5Vy+pD 5BUeCAP4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=gX KL2FMzwdnG6SFnsI5zE0u9rYw=; b=bv+e1bda4S2FNK9wQuxZ6hPHLcMK8qhwO3 d8jysbx9C0Xu8wB/rKMcWnGvSDx6fyKS9Aw2eXYXKD6aJjBqEPEfGC1NarRjEB15 z4ps59ga5qRhF3YR0F+TbdEU1QjXN9Kh//N89jUbprAv8ZYlWTfJ+QwUR4Wlcqkm 5bJ30A/u4= X-Sasl-enc: 5yQrMI3p7jacLuyDc3Mqit60wyUgLmhE3bxT7Wds0bEO 1439849039 Date: Mon, 17 Aug 2015 22:03:56 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: [PATCH] _subversion: Complete a few more option switches Message-ID: <20150817220356.GD2283@tarsus.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) The while (( idx )) form should guarantee that these switches are only added if the 'svn' binary supports them. (One of these switches isn't present in svn 1.8 or earlier.) --- diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion index 188a813..278f3bb 100644 --- a/Completion/Unix/Command/_subversion +++ b/Completion/Unix/Command/_subversion @@ -50,9 +50,27 @@ _svn () { args=( ${=${${${(M)${(f)"$(_comp_locale; _call_program options svn help $cmd)"#(*Valid options:|(#e))}:#* :*}%% #:*}/ (arg|ARG)/:arg:}/(#b)(-##)([[:alpha:]]##) \[--([a-z-]##)\](:arg:)#/(--$match[3])$match[1]$match[2]$match[4] ($match[1]$match[2])--$match[3]$match[4]} ) + while (( idx=$args[(I)*--accept:arg:] )); do + args[(I)*--accept:arg:]=( --accept':automatic conflict resolution action:((working\:working base\:base '"`for i j in p postpone mc mine-conflict tc theirs-conflict mf mine-full tf theirs-full e edit l launch; print -rn $i\\\\:$j $j\\\\:$j "" `"'))' ) + done while (( idx=$args[(I)*--c(l|hangelist):arg:] )); do args[(I)*--c(l|hangelist):arg:]=( \*{--cl,--changelist}':change list:_svn_changelists' ) done + while (( idx=$args[(I)*--config-dir:arg:] )); do + args[(I)*--config-dir:arg:]=( --config-dir':config dir:_directories' ) + done + while (( idx=$args[(I)*--depth:arg:] )); do + args[(I)*--depth:arg:]=( --depth':operation depth (how far to recurse):(empty files immediates infinity)' ) + done + while (( idx=$args[(I)*(-F|--file):arg:] )); do + args[(I)*(-F|--file):arg:]=( '(-F --file)'{-F,--file}':log message file:_files' ) + done + while (( idx=$args[(I)*--set-depth:arg:] )); do + args[(I)*--set-depth:arg:]=( --set-depth'[make working copy deeper or shallower]:new depth:(exclude empty files immediates infinity)' ) + done + while (( idx=$args[(I)*--trust-server-cert-failures:arg:] )); do + args[(I)*--trust-server-cert-failures:arg:]=( --trust-server-cert-failures':failures:_values -s , "certificate failures to ignore" "unknown-ca[unknown authority]" "cn-mismatch[hostname mismatch]" "expired[certificate expired]" "not-yet-valid[certificate not yet valid]" "other[all other failures]"' ) + done _store_cache svn-${cmd}-args args fi