Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: du(1) completion and a little $RANDOM problem
- X-seq: zsh-workers 18865
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: du(1) completion and a little $RANDOM problem
- Date: Thu, 17 Jul 2003 12:17:19 +0200
- In-reply-to: <1030716114641.ZM8844@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <752.1058355009@xxxxxxx> <1030716114641.ZM8844@xxxxxxxxxxxxxxxxxxxxxxx>
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
________________________________________________________________________
Messages sorted by:
Reverse Date,
Date,
Thread,
Author