From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7474 invoked from network); 17 Jul 2003 10:18:06 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 17 Jul 2003 10:18:06 -0000 Received: (qmail 27222 invoked by alias); 17 Jul 2003 10:18:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18865 Received: (qmail 27211 invoked from network); 17 Jul 2003 10:18:01 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 17 Jul 2003 10:18:01 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [212.125.75.4] by sunsite.dk (MessageWall 1.0.8) with SMTP; 17 Jul 2003 10:18:1 -0000 X-VirusChecked: Checked X-Env-Sender: okiddle@yahoo.co.uk X-Msg-Ref: server-2.tower-1.messagelabs.com!1058437029!567381 X-StarScan-Version: 5.0.7; banners=.,-,- Received: (qmail 9063 invoked from network); 17 Jul 2003 10:17:10 -0000 Received: from iris.logica.co.uk (158.234.9.163) by server-2.tower-1.messagelabs.com with SMTP; 17 Jul 2003 10:17:10 -0000 Received: from gmcs3.local ([158.234.142.61]) by iris.logica.co.uk (8.12.3/8.12.3/Debian -4) with ESMTP id h6HAGA7Y002549 for ; Thu, 17 Jul 2003 11:16:10 +0100 Received: from gmcs3.local (localhost [127.0.0.1]) by gmcs3.local (8.11.6/8.11.6/SuSE Linux 0.5) with ESMTP id h6HAHJ510669 for ; Thu, 17 Jul 2003 12:17:19 +0200 To: zsh-workers@sunsite.dk X-VirusChecked: Checked In-reply-to: <1030716114641.ZM8844@candle.brasslantern.com> From: Oliver Kiddle References: <752.1058355009@csr.com> <1030716114641.ZM8844@candle.brasslantern.com> Subject: Re: du(1) completion and a little $RANDOM problem Date: Thu, 17 Jul 2003 12:17:19 +0200 Message-ID: <10667.1058437039@gmcs3.local> Bart wrote: > On Jul 16, 12:30pm, Peter Stephenson wrote: > } > } 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?) > > Sven, Oliver and I have had several threads about this dating back a > very long time -- see for example zsh-workers/10998. That discussion resulted in _pick_variant. You need to be fairly confident that running the command in question to see what it is is safe and quick though. I'd have thought it would be safe for du as it doesn't have any destructive modes of operation that I'm aware of. On Solaris 8, du --version produces: du: illegal option -- - usage: du [-a][-d][-k][-r][-o|-s][-L] [file ...] I don't have access to any other systems to see what they do. The trick used by _finger to see what options are available is quite nice. Otherwise the best way to determine what options are available tends to be a big case statement checking $OSTYPE (after using _pick_variant to check for GNU). Oliver ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs Email Security System. For more information on a proactive email security service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________