From a4f5c345c89a066672328c81316ad9cad7a4c7cb Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 29 Nov 2019 01:45:18 +0000 Subject: 44947: _subversion: Complete the 'auth', 'changelist', 'patch', 'resolve', and 'x-unshelve' subcommands. --- ChangeLog | 4 ++++ Completion/Unix/Command/_subversion | 26 ++++++++++++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 09ac0641f..e870beee8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2019-11-29 Daniel Shahaf + * 44947: Completion/Unix/Command/_subversion: Complete the + 'auth', 'changelist', 'patch', 'resolve', and 'x-unshelve' + subcommands. + * 44946: Completion/Unix/Command/_subversion: Make _svn_conflicts not offer all files in the directory. diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion index 04a8da0bf..b39c8578e 100644 --- a/Completion/Unix/Command/_subversion +++ b/Completion/Unix/Command/_subversion @@ -131,6 +131,18 @@ _svn () { '*:file:_files -g "*(^e:_svn_controlled:)"' ) ;; + (auth) + args+=( + '*:auth pattern: ' + ) + ;; + (changelist) + args[(r)--remove]='(1)--remove' + args+=( + '(--remove)1:changelist name:_svn_changelists' + '*:file:_files -g "*(e:_svn_controlled:)"' + ) + ;; (commit) args=( ${args/(#b)(*--file*):arg:/$match[1]:file:_files} @@ -167,6 +179,12 @@ _svn () { (mergeinfo) args[(r)--show-revs=:arg:]=( '--show-revs=:revisions:(merged eligible)' ) ;; + (patch) + args+=( + '1:patch file:_files' + '2::working copy to patch:_files' + ) + ;; (propget|propedit|propdel) args+=( '1:property name:_svn_props' @@ -181,7 +199,7 @@ _svn () { '*:path or url: _alternative "files:file:_files" "urls:URL:_svn_urls"' ) ;; - (resolved) + (resolve|resolved) args+=( '*:file:_files -g "*(e:_svn_conflicts:)"' ) @@ -191,9 +209,9 @@ _svn () { '*:file:_files -g "(.svn|*)(/e:_svn_deletedfiles:,e:_svn_status:)"' ) ;; - (unshelve) - args+=( '1:shelf name:compadd - ${${(f)"$(_call_program shelves svn unshelve -q --list)"}%% *}' ) - ;; + (x-unshelve) + args+=( '1:shelf name:compadd - ${(f)"$(_call_program shelves svn x-shelves --quiet)"}' '2::shelf version' ) + ;; (*) case $usage in *(SRC|DST|TARGET|URL*PATH)*) -- cgit 1.4.1