From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11290 invoked from network); 13 Jul 2003 18:17:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 13 Jul 2003 18:17:18 -0000 Received: (qmail 10941 invoked by alias); 13 Jul 2003 18:17:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18844 Received: (qmail 10932 invoked from network); 13 Jul 2003 18:17:12 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 13 Jul 2003 18:17:12 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.64.233.9] by sunsite.dk (MessageWall 1.0.8) with SMTP; 13 Jul 2003 18:17:12 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h6DIHA705188 for zsh-workers@sunsite.dk; Sun, 13 Jul 2003 11:17:10 -0700 From: Bart Schaefer Message-Id: <1030713181710.ZM5187@candle.brasslantern.com> Date: Sun, 13 Jul 2003 18:17:10 +0000 In-Reply-To: <87wuenkuod.fsf@ceramic.fifi.org> Comments: In reply to Philippe Troin "Preventing sorting in completers" (Jul 12, 7:49pm) References: <87wuenkuod.fsf@ceramic.fifi.org> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Preventing sorting in completers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 12, 7:49pm, Philippe Troin wrote: } } zstyle ":completion:*:processes" command \ } 'ps -u $UID -o ''pid tty s args'' --forest' Hmm. When I try to use that set of "ps" arguments, I get no completions at all. Some investigation reveals that "ps" is giving ERROR: TTY could not be found. However, assuming that it's working for you ... } The problem is that the completion frameworks show the process list } sorted by PID. How can I prevent that and get the process list in the } order it was returned by ps (so that --forest makes sense). You need to edit the _pids function and change the line _wanted processes expl 'process ID' compadd "$@" "$desc[@]" "$all[@]" -a pids && ret=0 To _wanted -V processes expl 'process ID' compadd "$@" "$desc[@]" "$all[@]" -a pids && ret=0 Bonus points for making use of the "sort" style and submitting a patch ...