diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Debian/Command/_debcheckout | 21 | ||||
-rw-r--r-- | Completion/Unix/Command/_git | 1 | ||||
-rw-r--r-- | Completion/Unix/Command/_subversion | 20 |
3 files changed, 41 insertions, 1 deletions
diff --git a/Completion/Debian/Command/_debcheckout b/Completion/Debian/Command/_debcheckout new file mode 100644 index 000000000..3e6d5df7d --- /dev/null +++ b/Completion/Debian/Command/_debcheckout @@ -0,0 +1,21 @@ +#compdef debcheckout + +# The helpstrings use the term 'checkout' (rather than 'clone' or 'branch' or +# 'fork') to be consistent with the name of the tool. + +local -a args=( +'(-a --auth)'{-a,--auth}'[rewrite anonymous checkout URLs to authenticated ones]' +'(-p --print -d --details)'{-d,--details}'[print detailed information; do not checkout]' +'(-h --help)'{-h,--help}'[show usage message]' +'(-p --print -d --details)'{-p,--print}'[print summary information; do not checkout]' +'(-P --package)'{-P+,--package=}'[specify package name explicitly (when target is a URL)]:package name:_deb_packages available' +'(-t --type)'{-t+,--type=}'[specify repository type]:repository type:((arch\:Arch bzr\:Bazaar cvs\:CVS darcs\:Darcs git\:Git hg\:Mercurial svn\:Subversion))' +'(-u --username)'{-u+,--username=}'[specify username (implies --auth)]:username: ' +\*{-f+,--file=}'[extract named file]:remote filename' +'--source=:policy for .orig.tar.gz file:(never auto download-only always)' +'--git-track=[specify branches to track]:branches (separated by spaces) or '\'\*\' +'1:package or URL: _alternative "_deb_packages available" "_urls"' +'2::destination directory:_path_files -/' +) + +_arguments -s -S : "$args[@]" diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index a096007d6..740969903 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -6008,6 +6008,7 @@ __git_tree_files () { if [[ $1 == --root-relative ]]; then extra_args+=(--full-tree) + shift fi zparseopts -D -E -a compadd_opts V: J: 1 2 n f X: M: P: S: r: R: q F: diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion index 1cffc3c04..3cc9e8a0b 100644 --- a/Completion/Unix/Command/_subversion +++ b/Completion/Unix/Command/_subversion @@ -4,6 +4,20 @@ _svn () { local curcontext="$curcontext" state line expl ret=1 typeset -A opt_args + # Colons in values must be escaped. + local -A show_item_keys=( + kind "the kind of TARGET (file or dir)" + url "the URL of TARGET in the repository" + relative-url "the repository-relative URL" + repos-root-url "the repository root URL" + repos-uuid "the repository UUID" + revision "the revision of TARGET" + last-changed-revision "the most recent revision in which TARGET was changed" + last-changed-date "the date of the last-changed revision" + last-changed-author "the author of the last-changed revision" + wc-root "the working copy root path" + ) + local update_policy zstyle -s ":completion:*:*:$service:*" cache-policy update_policy if [[ -z "$update_policy" ]]; then @@ -51,7 +65,7 @@ _svn () { ${=${${${(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 "" `"'))' ) + 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; do print -rn $i\\\\:$j $j\\\\:$j ""; done `"'))' ) done while (( idx=$args[(I)*--c(l|hangelist):arg:] )); do args[(I)*--c(l|hangelist):arg:]=( \*{--cl,--changelist}':change list:_svn_changelists' ) @@ -71,6 +85,10 @@ _svn () { 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 + while (( idx=$args[(I)*--show-item:arg:] )); do + # (q) to quote the parentheses in the value + args[(I)*--show-item:arg:]=( --show-item':item key:(('"`for i j in ${(kv)show_item_keys}; do print -rn - $i\\\\:"${(q)j}" ""; done`"'))' ) + done _store_cache svn-${cmd}-args args fi |