From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26054 invoked from network); 16 Jul 2003 11:30:28 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 16 Jul 2003 11:30:28 -0000 Received: (qmail 24159 invoked by alias); 16 Jul 2003 11:30:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18861 Received: (qmail 24146 invoked from network); 16 Jul 2003 11:30:19 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 16 Jul 2003 11:30:19 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 16 Jul 2003 11:30:19 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.cambridgesiliconradio.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Tue, 15 Jul 2003 12:29:38 +0100 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Wed, 16 Jul 2003 12:29:02 +0100 To: zsh-workers@sunsite.dk Subject: Re: du(1) completion and a little $RANDOM problem In-reply-to: "Guillaume Chazarain"'s message of "Wed, 16 Jul 2003 13:16:31 +0200." Date: Wed, 16 Jul 2003 12:30:09 +0100 Message-ID: <752.1058355009@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 16 Jul 2003 11:29:02.0651 (UTC) FILETIME=[754628B0:01C34B8D] Guillaume Chazarain wrote: > Hi list, > > Zsh's default completion on the du(1) command is to show only the > directories, but why? since du can also be used on files. It probably deserves it's own completion. Note if you have GNU du you can: compdef _gnu_generic du for best results. (I wonder if we could autodetect or at least guess some of these at startup where guessing wrong isn't too painful?) > But if I do echo `echo $RANDOM` then the random value is always the same. This is documented in the manual entry. RANDOM A pseudo-random integer from 0 to 32767, newly gen- erated each time this parameter is referenced. The random number generator can be seeded by assigning a numeric value to RANDOM. The values of RANDOM form an intentionally-repeatable pseudo-random sequence; subshells that reference RANDOM will result in identical pseudo-random values unless the value of RANDOM is referenced or seeded in the parent shell in between subshell invocations. The workaround is to refer to it in the current shell between invocations. The only other fix would be some communication with the subshell. -- 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. **********************************************************************