Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _perforce to add pid completion
- X-seq: zsh-workers 21154
- From: Felix Rosencrantz <f.rosencrantz@xxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: _perforce to add pid completion
- Date: Mon, 18 Apr 2005 08:33:50 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=XPeBpJ8T2/vp9UkZJXC/3+je0BpT+B+eo0cEjfFVoXxEiGpX3/rc4NRkWfa+Kp4r7sQxGose6JXJyAnveL2+XBEJnC5fuW4i820xz1W9gAPeFyHPL7ja3N8EUglAQOi47AEhz1+Y+fNZ/TGd/+nfPRRyXe5XDQdOZsfPRFr8elc=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Reply-to: Felix Rosencrantz <f.rosencrantz@xxxxxxxxx>
Adds pid completion to the p4 monitor (clear|terminate) commands.
-FR.
Index: Completion/Unix/Command/_perforce
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_perforce,v
retrieving revision 1.24
diff -u -r1.24 _perforce
--- Completion/Unix/Command/_perforce 12 Jan 2005 10:32:20 -0000 1.24
+++ Completion/Unix/Command/_perforce 18 Apr 2005 15:28:52 -0000
@@ -1311,6 +1311,15 @@
}
+(( $+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 @@
;;
(terminate|clear)
- _message "process ID"
+ _perforce_pids
;;
(*)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author