From fdfd451861d2221b728c611558ba86480fdfe7ed Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 7 Sep 2011 15:58:54 +0000 Subject: unposted: Perforce completion for 2010.2 release --- Completion/Unix/Command/_perforce | 53 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command/_perforce') diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce index 08c42cbce..1f39545e7 100644 --- a/Completion/Unix/Command/_perforce +++ b/Completion/Unix/Command/_perforce @@ -1686,6 +1686,7 @@ _perforce_cmd_annotate() { '-a[all, show both added and deleted lines]' \ '-c[output change numbers instead of revisions]' \ '-i[follow branches (integration records)]' \ + '-I[follow integrations to get change numbers]' \ '-q[quiet, suppress one-line file header]' \ '*::file:_perforce_files -tR' } @@ -1748,7 +1749,8 @@ _perforce_cmd_change() { '(-d -i -f)-o[output specification to standard output]' \ '(-d -o)-i[read specification from standard input]' \ '(-d -o)-u[force change of jobs or description by owner]' \ - "(-i)1::change:_perforce_changes$ctype" + "(-i)1::change:_perforce_changes$ctype" \ + '-t[specify visibility type]:visibility type:(public restricted)' } @@ -1800,6 +1802,22 @@ _perforce_cmd_clients() { } +(( $+functions[_perforce_cmd_copy] )) || +_perforce_cmd_copy() { + local range + # If -s is present, the first normal argument can't have revRange. + [[ ${words[(I)-s]} -eq 0 ]] && range=" -tR" + _arguments -s : \ + '-b[select branch]:branch:_perforce_branches' \ + '-c[select change for copy]:change:_perforce_changes -tc' \ + '-n[no action, dummy run]' \ + '-r[reverse direction of copy with branch]' \ + '-s[select source with -b]:source file:_perforce_files -tR' \ + '-v[leave newly copied files uncopied till sync]' \ + "1:file:_perforce_files$range" \ + '*::file:_perforce_files' +} + (( $+functions[_perforce_cmd_counter] )) || _perforce_cmd_counter() { _arguments -s : \ @@ -1942,7 +1960,8 @@ _perforce_cmd_export() { '(-j)-l[specify number of lines]:number of lines: ' \ '(-j)-F[specify filter]:filter pattern: ' \ '(-c)-r[raw format]' \ - '-J[specify file prefix]:file prefix: ' + '-J[specify file prefix]:file prefix: ' \ + '-T[space-separated list of tables not to export]' } @@ -2117,8 +2136,8 @@ _perforce_cmd_help() { (( $+functions[_perforce_cmd_info] )) || _perforce_cmd_info() { - # No arguments - _arguments -s : + _arguments -s : \ + '-s[don'\''t check for unknown users or clients]' } @@ -2257,6 +2276,7 @@ _perforce_cmd_labelsync() { '-d[delete files from label]' \ '-n[no effect, dummy run]' \ '-l[specify label]:label:_perforce_labels' \ + '-q[suppress informational messages]' \ '*::file:_perforce_files -tR' } @@ -2407,6 +2427,19 @@ _perforce_cmd_passwd() { } +(( $+functions[_perforce_cmd_ping] )) || +_perforce_cmd_ping() { + _arguments -s : \ + '-c[specify count of messages]:count of messages: ' \ + '-t[specify total time of test]:time in seconds: ' \ + '-i[specify iterations for test]:number of iterations: ' \ + '-f[transmit continuously without waiting for responses]' \ + '-p[specify pause between tests]:pause in seconds: ' \ + '-s[specify send size]:send size in octets: ' \ + '-r[specify receive size]:receive size in octets: ' +} + + (( $+functions[_perforce_cmd_print] )) || _perforce_cmd_print() { _arguments -s : \ @@ -2437,6 +2470,15 @@ _perforce_cmd_protects() { } +(( $+functions[_perforce_cmd_pull] )) || +_perforce_cmd_pull() { + _arguments -s : \ + '-i[repeat as specified]:seconds between repeats: ' \ + '-u[retrieve file content rather than journal]' \ + '-p[display information about pending transfers]' \ + '-J[specify prefix for journal file]:journal file prefix: ' +} + (( $+functions[_perforce_cmd_reopen] )) || _perforce_cmd_reopen() { # Assume user doesn't want to reopen to same changelist. @@ -2462,7 +2504,9 @@ _perforce_cmd_replicate() { '-J[specify file prefix]:file prefix: ' \ '-k[keep pipe open]' \ '-o[specify output file]:output file:_files' \ + '-R[reconnect on failure, needs -i]' \ '-s[specify file to track state]:state file:_files' \ + '-T[space-separate list of tables not to transfer]' \ '-x[terminate when journal rotates]' \ '*::->_command' } @@ -2580,6 +2624,7 @@ _perforce_cmd_sync() { '-f[force resynchronisation]' \ '-n[show operations but don'\''t perform them]' \ '-k[bypass client file update]' \ + '-q[suppress informational messages]' \ '*::file:_perforce_files -tR' } -- cgit v1.2.3 From 4685aae8431209e365c4afb776d8ddb6c3d9f91b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Mon, 17 Oct 2011 17:00:48 +0000 Subject: small _perforce documentation update --- ChangeLog | 7 ++++++- Completion/Unix/Command/_perforce | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'Completion/Unix/Command/_perforce') diff --git a/ChangeLog b/ChangeLog index bc4572ad4..6e8776d7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-17 Peter Stephenson + + * unposted: Completion/Unix/Command/_perforce: small + documentation update. + 2011-10-14 Peter Stephenson * 29820: Doc/Zsh/compsys.yo, @@ -15461,5 +15466,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5476 $ +* $Revision: 1.5477 $ ***************************************************** diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce index 1f39545e7..4661e18bc 100644 --- a/Completion/Unix/Command/_perforce +++ b/Completion/Unix/Command/_perforce @@ -3,7 +3,7 @@ # Maintainer: Peter Stephenson . # Increasingly loosely based on _cvs version 1.17. -# Completions currently based on Perforce release 2006.2. +# Completions currently based on Perforce release 2010.2. # Styles, tags and contexts # ========================= -- cgit v1.2.3 From 19550e7713c59cf3bc795fc0e0a3c6d62f88bb46 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sun, 30 Oct 2011 19:39:43 +0000 Subject: users/16547: quote p4 arguments with colons in from _describe --- ChangeLog | 7 ++++++- Completion/Unix/Command/_perforce | 14 +++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'Completion/Unix/Command/_perforce') diff --git a/ChangeLog b/ChangeLog index 8739e7597..61d4e4643 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-10-30 Peter Stephenson + + * users/16547: Completion/Unix/Command/_perforce: quote + arguments with colon in from _describe. + 2011-10-28 Peter Stephenson * Src/module.c (do_load_module): 29879: (via takimoto-j): Metafy @@ -15522,5 +15527,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5489 $ +* $Revision: 1.5490 $ ***************************************************** diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce index 4661e18bc..2c1365a79 100644 --- a/Completion/Unix/Command/_perforce +++ b/Completion/Unix/Command/_perforce @@ -603,7 +603,7 @@ _perforce_global_options() { _perforce_branches() { local bline match mbegin mend local -a bl - bl=(${${${(f)"$(_perforce_call_p4 branches branches 2>/dev/null)"}##Branch }/ /:}) + bl=(${${${${(f)"$(_perforce_call_p4 branches branches 2>/dev/null)"}##Branch }//:/\\:}/ /:}) [[ $#bl -eq 1 && $bl[1] = '' ]] && bl=() (( $#bl )) && _describe -t branches 'Perforce branch' bl } @@ -685,7 +685,7 @@ awk '/^Client:/ { print $2 }')") # Limit to the 20 most recent changes by default to avoid huge # output. cl=( -${${${${(f)"$(_perforce_call_p4 changes changes $amax $xargs $cstatus \$file)"}##Change\ }//\ on\ /:}/\ by\ /\ } +${${${${${(f)"$(_perforce_call_p4 changes changes $amax $xargs $cstatus \$file)"}##Change\ }//:/\\:}//\ on\ /:}/\ by\ /\ } ) # "default" can't have shelved files in it... [[ $ctype = shelved* ]] || cl+=("default:change not yet numbered") @@ -711,7 +711,7 @@ _perforce_clients() { compset -P '//' && slash=(-S/ -q) fi - cl=(${${${(f)"$(_perforce_call_p4 clients clients)"}##Client\ }/\ /:}) + cl=(${${${${(f)"$(_perforce_call_p4 clients clients)"}##Client\ }//:/\\:}/\ /:}) [[ $#cl -eq 1 && $cl[1] = '' ]] && cl=() _describe -t clients 'Perforce client' cl $slash } @@ -722,7 +722,7 @@ _perforce_counters() { local cline match mbegin mend local -a cl - cl=(${${${(f)"$(_perforce_call_p4 counters counters)"}/\ /:}/\=/current value}) + cl=(${${${${(f)"$(_perforce_call_p4 counters counters)"}//:/\\:}/\ /:}/\=/current value}) [[ $#cl -eq 1 && $cl[1] = '' ]] && cl=() _describe -t counters 'Perforce counter' cl } @@ -796,7 +796,7 @@ _perforce_depots() { local dline match mbegin mend local -a dl - dl=(${${${(f)"$(_perforce_call_p4 depots depots)"}##Depot\ }/\ /:}) + dl=(${${${${(f)"$(_perforce_call_p4 depots depots)"}##Depot\ }//:/\\:}/\ /:}) [[ $#dl -eq 1 && $dl[1] = '' ]] && dl=() _describe -t depots 'depot name' dl } @@ -1594,7 +1594,7 @@ _perforce_submit_options() { _perforce_pids() { local -a ul - ul=(${${${(f)"$(_perforce_call_p4 monitor monitor show 2>/dev/null)"}# *}/\ /:}) + ul=(${${${${(f)"$(_perforce_call_p4 monitor monitor show 2>/dev/null)"}# *}//:/\\:}/\ /:}) [[ $#ul -eq 1 && $ul[1] = '' ]] && ul=() _describe -t id 'process ID' ul } @@ -1604,7 +1604,7 @@ _perforce_pids() { _perforce_users() { local -a ul - ul=(${${(f)"$(_perforce_call_p4 users users)"}/\ /:}) + ul=(${${${(f)"$(_perforce_call_p4 users users)"}//:/\\:}/\ /:}) [[ $#ul -eq 1 && $ul[1] = '' ]] && ul=() _describe -t users 'Perforce user' ul } -- cgit v1.2.3