From 9d43c7653b019ebb21560193f78e49d6c0e05a51 Mon Sep 17 00:00:00 2001 From: Felix Rosencrantz Date: Mon, 18 Apr 2005 15:48:05 +0000 Subject: 21154 - Added pid completion to _perforce for p4 monitor (clear|terminate) commands. --- Completion/Unix/Command/_perforce | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_perforce') 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 ;; (*) -- cgit 1.4.1