about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2004-09-21 14:41:05 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2004-09-21 14:41:05 +0000
commitf212e8072dbd4db4b4a1c1f2186b9120673621cf (patch)
treec0b1506f12aec9f5334b9fa2d12c689e5da90852 /Completion
parent0f1267a8aaa079a10b241acfb8eb82e52867ade2 (diff)
downloadzsh-f212e8072dbd4db4b4a1c1f2186b9120673621cf.tar.gz
zsh-f212e8072dbd4db4b4a1c1f2186b9120673621cf.tar.xz
zsh-f212e8072dbd4db4b4a1c1f2186b9120673621cf.zip
Unposted: update _perforce for release 2004.2
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_perforce115
1 files changed, 99 insertions, 16 deletions
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index b7b429c17..13c247183 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -1,6 +1,7 @@
 #compdef p4 -value-,P4CLIENT,-default- -value-,P4PORT,-default- -value-,P4MERGE,-default- -value-,P4USER,-default-
 
 # Increasingly loosely based on _cvs version 1.17.
+# Completions currently based on Perforce release 2004.2.
 
 # Styles, tags and contexts
 # =========================
@@ -1351,9 +1352,11 @@ _perforce_cmd_admin() {
 
 (( $+functions[_perforce_cmd_annotate] )) ||
 _perforce_cmd_annotate() {
-  # If you don't have this, it's new in release 2002.2.
+  # New in release 2002.2.
+  # -c was new in about 2003.2.
   _arguments -s : \
     '-a[all, show both added and deleted lines]' \
+    '-c[output change numbers instead of revisions]' \
     '-q[quiet, suppress one-line file header]' \
     '*::file:_perforce_files -tR'
 }
@@ -1396,6 +1399,7 @@ _perforce_cmd_change() {
 _perforce_cmd_changes() {
   _arguments -s : \
     '-i[include integrated changes]' \
+    '-t[output time as well as date]' \
     '-l[long output]' \
     '-c+[select by client]:client:_perforce_clients' \
     '-m+[most recent N changes]:max changes: ' \
@@ -1408,7 +1412,7 @@ _perforce_cmd_changes() {
 (( $+functions[_perforce_cmd_client] )) ||
 _perforce_cmd_client() {
   _arguments -s : \
-    '-f[force modification by superuser]' \
+    '(-o)-f[force modification by superuser]' \
     '-t[use template]:template client:_perforce_clients' \
     '(-o -i -t)-d[delete client]' \
     '(-d -i -f)-o[print to standard output]' \
@@ -1480,7 +1484,7 @@ _perforce_cmd_diff() {
   local limit
   [[ ${words[(I)-(f|sd|se)]} -eq 0 ]] && limit=" -to"
   _arguments -s : \
-    '-d-[select diff option]:diff option:((b\:ignore\ blanks c\:context n\:RCS s\:summary u\:unified w\:ignore\ all\ whitespace))' \
+    '-d-[select diff option]:diff option:((b\:ignore\ blanks c\:context l\:ignore\ line\ endings n\:RCS s\:summary u\:unified w\:ignore\ all\ whitespace))' \
     '-f[diff every file]' \
     '(-sd -se -sr)-sa[opened files, different or missing]' \
     '(-sa -se -sr)-sd[unopened files, missing]' \
@@ -1575,13 +1579,16 @@ _perforce_cmd_flush() {
 (( $+functions[_perforce_cmd_fstat] )) ||
 _perforce_cmd_fstat() {
   _arguments -s : \
-    '-c+[select by change]:change:_perforce_changes -ts' \
-    '-C[select mapped files]' \
-    '-H[select synced files]' \
-    '-W[select opened files]' \
-    '-l[include fileSize, possibly slow]' \
-    '-P[output clientFile in full Perforce syntax]' \
-    '-s[shorten, no client-related data]' \
+    '-c+[affected since change]:change:_perforce_changes -ts' \
+    '-e+[affected by change]:change:_perforce_changes -ts' \
+    '-C[select mapped files (-Rc)]' \
+    '-H[select synced files (-Rh)]' \
+    '-W[select opened files (-Ro)]' \
+    '-l[include fileSize, possibly slow (-Ol)]' \
+    '-O-[select output type]:output type:((l\:fileSize p\:client\ path\ format r\:pending\ integrations s\:exclude\ local\ path))' \
+    '-P[output clientFile in full Perforce syntax (-Op)]' \
+    '-R-[restrict selected files]:restriction:((c\:mapped\ in\ client h\:synced\ to\ client n\:not\ synced\ to\ head o\:opened r\:resolved u\:unresolved))' \
+    '-s[shorten, no client-related data (-Os)]' \
     '*::file:_perforce_files'
 }
 
@@ -1643,12 +1650,19 @@ _perforce_cmd_integrate() {
     '-b[select branch]:branch:_perforce_branches' \
     '-c[select change for integration]:change:_perforce_changes -tp' \
     '-f[force reintegration]' \
-    '-d[reintegrated deleted files]' \
+    '-d[reintegrate deleted files]' \
+    '-D-[specify allowed deletions]:deletion type:((
+t\:rebranch\ on\ deleted\ file
+s\:delete\ modified\ target\ file
+i\:ignore\ readded\ source\ file
+))' \
     '-h[integrate to revision had on client]' \
     '-i[integrate if no common file base]' \
+    '-I[same as -i from 2004.2]' \
     '-n[no action, dummy run]' \
+    '-o[display base file name for subsequent resolve]' \
     '-r[reverse direction of integration with branch]' \
-    '-s[select source]:source file:_perforce_files -tR' \
+    '-s[select source with -b]:source file:_perforce_files -tR' \
     '-t[propagate type changes]' \
     '-v[leave newly branched files uncopied till sync]' \
     "1:file:_perforce_files$range" \
@@ -1658,7 +1672,10 @@ _perforce_cmd_integrate() {
 
 (( $+functions[_perforce_cmd_integrated] )) ||
 _perforce_cmd_integrated() {
-  _perforce_files -ti
+  _arguments -s : \
+    '-r[reverse mapping in branch view with -b]' \
+    '-b[select files integrated via branch]:branch:_perforce_branches' \
+    '*::file:_perforce_files -ti'
 }
 
 
@@ -1680,8 +1697,8 @@ _perforce_cmd_jobs() {
     '-i[included integrated changes]' \
     '-l[long output, full job descriptions]' \
     '-r[reverse order of job names]' \
-    '-m[limit to most recent N jobs]:most recent jobs: ' \
-    '(-e -i -l -m)-R[]' \
+    '-m[limit to most recent N jobs]:number of most recent jobs: ' \
+    '(-e -i -l -m)-R[rebuild jobs table on upgrade]' \
     '*::file:_perforce_files -tR'
 }
 
@@ -1740,6 +1757,52 @@ _perforce_cmd_logger() {
 }
 
 
+
+(( $+functions[_perforce_cmd_login] )) ||
+_perforce_cmd_login() {
+  _arguments -s : \
+    '-a[ticket valid on all machines]' \
+    '-p[display ticket, do not store]' \
+    '-s[show status of ticket]' \
+    '(-s)1::user:_perforce_users'
+}
+
+
+(( $+functions[_perforce_cmd_logout] )) ||
+_perforce_cmd_logout() {
+  _arguments -s : \
+    '-a[invalidate ticket on server]'
+}
+
+
+(( $+functions[_perforce_cmd_monitor] )) ||
+_perforce_cmd_monitor() {
+  if (( CURRENT > 2 )); then
+    case $words[2] in
+      (show)
+      shift words
+      (( CURRENT-- ))
+      _arguments -s : \
+        '-a[show command arguments]' \
+        '-e[show command environment]' \
+        '-l[long output format]'
+      ;;
+
+      (terminate|clear)
+      _message "process ID"
+      ;;
+
+      (*)
+      _message "no such monitor command: $words[1]"
+      ;;
+    esac
+  else
+    local expl
+    _wanted monitor-command expl 'monitor command' compadd show terminate clear
+  fi
+}
+
+
 (( $+functions[_perforce_cmd_obliterate] )) ||
 _perforce_cmd_obliterate() {
   _message "obliterate is dangerous: you're on your own here."
@@ -1798,6 +1861,7 @@ _perforce_cmd_resolve() {
     '-d-[select diff option]:diff option:((b\:ignore\ blanks w\:ignore\ all\ whitespace))' \
     '-f[force re-resolution]' \
     '-n[no action, just list]' \
+    '-o[display base file name and revision for merge]' \
     '-t[force textual merge on binary files]' \
     '-v[verbose, mark all changes]' \
     '*::file:_perforce_files -to'
@@ -1806,7 +1870,9 @@ _perforce_cmd_resolve() {
 
 (( $+functions[_perforce_cmd_resolved] )) ||
 _perforce_cmd_resolved() {
-  _perforce_files -tr
+  _arguments -s : \
+    '-o[report revision used as base for resolve]' \
+    '*::file:_perforce_files -tr'
 }
 
 
@@ -1866,6 +1932,16 @@ _perforce_cmd_sync() {
 }
 
 
+(( $+functions[_perforce_cmd_tag] )) ||
+_perforce_cmd_tag() {
+  _arguments -s : \
+    '-d[delete association between label and files]' \
+    '-n[show what files would be tagged]' \
+    '-l[specify label]:label:_perforce_labels' \
+    '*::file:_perforce_files -tR'
+}
+
+
 (( $+functions[_perforce_cmd_triggers] )) ||
 _perforce_cmd_triggers() {
   _arguments -s : \
@@ -1874,6 +1950,13 @@ _perforce_cmd_triggers() {
 }
 
 
+(( $+functions[_perforce_cmd_tickets] )) ||
+_perforce_cmd_tickets() {
+  # No arguments.
+  _arguments -s :
+}
+
+
 (( $+functions[_perforce_cmd_typemap] )) ||
 _perforce_cmd_typemap() {
   _arguments -s : \