From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6045 invoked from network); 14 Jul 2003 15:11:25 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Jul 2003 15:11:25 -0000 Received: (qmail 23223 invoked by alias); 14 Jul 2003 15:11:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18845 Received: (qmail 23213 invoked from network); 14 Jul 2003 15:11:18 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 14 Jul 2003 15:11:18 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 14 Jul 2003 15:11:13 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.cambridgesiliconradio.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Sun, 13 Jul 2003 16:10:37 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Mon, 14 Jul 2003 16:10:05 +0100 To: zsh-workers@sunsite.dk Subject: Re: Preventing sorting in completers In-reply-to: "Bart Schaefer"'s message of "Sun, 13 Jul 2003 18:17:10 -0000." <1030713181710.ZM5187@candle.brasslantern.com> Date: Mon, 14 Jul 2003 16:11:08 +0100 Message-ID: <5798.1058195468@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 14 Jul 2003 15:10:05.0707 (UTC) FILETIME=[01D865B0:01C34A1A] Bart Schaefer wrote: > 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. My guess is your system is using stdout to decide what the tty is, which is explicitly closed. Try using 1>&2 on the ps command line. (Or something gets closed. Is it stdin? Anyway, reopen it.) > You need to edit the _pids function and change the line > > _wanted processes expl 'process ID' compadd "$@" "$desc[@]" "$all[@]" -a pid > s && 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 ... This -J/-V business always got me really confused. The documentation for _wanted says it takes the same arguments as _requested. _requested doesn't say anything about its arguments, but _description, which is down there underneath, does say how it handles them. Passing them down is a bit of a nightmare. I suspect what we want to do is test for an explicitly set sort style in _description and used that to override the default. Then we can all forget about tweaking the functions. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************