about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix Rosencrantz <f_rosencrantz@users.sourceforge.net>2005-04-18 15:48:05 +0000
committerFelix Rosencrantz <f_rosencrantz@users.sourceforge.net>2005-04-18 15:48:05 +0000
commit9d43c7653b019ebb21560193f78e49d6c0e05a51 (patch)
tree3efac4af3ddeb29061a76a49a075a797e66a3a8a
parent164ddacc853f11dabed33c0b5f8a3eb75f50e623 (diff)
downloadzsh-9d43c7653b019ebb21560193f78e49d6c0e05a51.tar.gz
zsh-9d43c7653b019ebb21560193f78e49d6c0e05a51.tar.xz
zsh-9d43c7653b019ebb21560193f78e49d6c0e05a51.zip
21154 - Added pid completion to _perforce for p4 monitor (clear|terminate) commands.
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Command/_perforce11
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ea1d73657..79cf91921 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-04-18  Felix Rosencrantz <f_rosencrantz@gmail.com>
+	*  21154: Completion/Unix/Command/_perforce: add pid completion for
+	monitor (clear|terminate) commands.
+
 2005-04-17  Clint Adams  <clint@zsh.org>
 
 	* 21153: Completion/Debian/Command/_module-assistant: incorporate
diff --git a/Completion/Unix/Command/_perforce b/Completion/Unix/Command/_perforce
index 3455d0cf9..f9bad2a24 100644
--- a/Completion/Unix/Command/_perforce
+++ b/Completion/Unix/Command/_perforce
@@ -1311,6 +1311,15 @@ _perforce_statuses() {
 }
 
 
+(( $+functions[_perforce_pids] )) ||
+_perforce_pids() {
+  local -a ul
+
+  ul=(${${${(f)"$(_perforce_call_p4 monitor monitor show 2>/dev/null)"}# *}/\ /:})
+  [[ $#ul -eq 1 && $ul[1] = '' ]] && ul=()
+  _describe -t id 'process ID' ul
+}
+
 
 (( $+functions[_perforce_users] )) ||
 _perforce_users() {
@@ -1808,7 +1817,7 @@ _perforce_cmd_monitor() {
       ;;
 
       (terminate|clear)
-      _message "process ID"
+      _perforce_pids
       ;;
 
       (*)