zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH] _subversion: Complete a few more option switches
Date: Mon, 17 Aug 2015 22:03:56 +0000	[thread overview]
Message-ID: <20150817220356.GD2283@tarsus.local2> (raw)

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
 


                 reply	other threads:[~2015-08-17 22:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150817220356.GD2283@tarsus.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).