From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4479 invoked by alias); 30 Jul 2015 16:23:58 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20372 Received: (qmail 25548 invoked from network); 30 Jul 2015 16:23:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1438273019; bh=UmqR1pk2w9kT580o5Rbp2Oq775fqHZMHhfnBYEeDjYA=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=n3nCllhK1YBHOvMhhXxTd4nXdWul2dCUUS1uMhjrZ9Y759WQsbcaex/u7e7fzUHw6/oTg5M5h6r1nxe9LcT2nqtdZLPLQPhiqurldVKEyfhz7HtLkePZAi14Sqq8Mg5nz+KiPaeMNtrYDFLUA2WuYiH4iaCVMfZ57c//F80/WxqnjWFv6uKUOHX+FaMFTa8e8ziaf6cUFycykoICIT9+e8Tu3LsqXkckVrVZ4Lq1uLMDAcRG0EPT2EfluUuRzS2ndsbu/XvAAhSihWyhMw2Axmvv8WJ5a4V1+RgwsweqO/Cmfl1aU8piDRZLrEG/rXQkShNigJgIsFtRErILfEZPFw== X-Yahoo-Newman-Id: 78023.49749.bm@smtp140.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: K3FgVGkVM1kBk8Wqu_3GuV3mk1CUPk3OVavsrqzDf6a0e1z UWnU9fviKt_BPucet9Y0umoz0l44at4evLXMaO26wLhwjZiChFHHE6GKv_T. kEv_ahclQTRsT6OBxaqa_H.YQX4Y5_xgIKNO1Fc6ylBNDsXNaMmzIlG6zMQ2 QAX6d2ZEXvvaczGC7T.O9hAB6HXubeBK8iK.xl6iA9BcRRPNZXbf39_k8D6o TQygXiqyVM3mc82rZE.jcD.FzzZxEdFz_G1zUx4etuUx4Wpo65qo9kUegSV_ aC2tUIAbZBliiM35zB6D6fLD3WbjsXRREP4U6Yzkr1qOjk48Ha8xc10S68rz jGB9UzEctODuYtoDnWZT8Wls7RPdWiSQVAP0jZ2nTfZt.GC7OsJrfkUCsVLi 89tCY2p1YXg5saeqVdVjXVtI.nObV9CzN_EBEpgcIZ2Ai3TLuBFFFjzXTJrc d7oevjDoVLK7dM.74zuWfjgzsTH7qR0gSIAgIn9tYDlEabcstcjrC7CaT_ol nin_AfiN3SbbW8B5pMrh9a_FbVbqyGA-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <20150730154201.GD2264@tarsus.local2> From: Oliver Kiddle References: <150728121925.ZM8124@torch.brasslantern.com> <20150730154201.GD2264@tarsus.local2> To: zsh-users@zsh.org Subject: Re: ps http completion to get procees ID MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <26692.1438273017.1@thecus.kiddle.eu> Date: Thu, 30 Jul 2015 18:16:57 +0200 Message-ID: <26693.1438273017@thecus.kiddle.eu> Daniel Shahaf wrote: > It seems to only complete processes from the current terminal. For > example, if I just do 'ps ', I get: > I guess that's due to _pids running 'ps' without further arguments. > Shouldn't the command be configurable? I'd love to have it show all > user processes (or even all processes when sudoed). It is configurable. The command style is not specific to kill. I'd recommend using tag labels and use the _next_tags widget if you want it to pick-up a wider range of processes. Something like the following: zstyle ':completion:*:(kill|lsof|ps|ss):*:' tag-order processes:-tty 'processes:-mine:user\ processes' 'processes:-all:all\ processes' zstyle ':completion:*:([sl]trace|truss|gcore|gdb):*:' tag-order processes:-mine 'processes:-all:all\ processes' case $OSTYPE in *bsd*) zstyle ':completion:*:processes' command 'ps -o pid,ppid,state,start,args' zstyle ':completion:*:processes-mine' command "ps U $EUID -o pid,ppid,state,start,args" zstyle ':completion:*:processes-all' command "ps A -o pid,ppid,state,start,args" ;; *) zstyle ':completion:*:processes' command 'ps -o pid,s,ppid,stime,args' zstyle ':completion:*:processes-mine' command "ps -u $EUID -o pid,s,ppid,stime,args" zstyle ':completion:*:processes-all' command 'ps -e -o pid,s,ppid,stime,args' ;; esac Oliver