From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17309 invoked from network); 3 Apr 2001 21:27:05 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Apr 2001 21:27:05 -0000 Received: (qmail 18360 invoked by alias); 3 Apr 2001 21:26:58 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13899 Received: (qmail 18347 invoked from network); 3 Apr 2001 21:26:58 -0000 Date: Tue, 3 Apr 2001 17:26:54 -0400 From: Clint Adams To: Oliver Kiddle Cc: Zsh workers Subject: Re: _apm (was Re: Functions moved) Message-ID: <20010403172654.A9126@dman.com> References: <200104021441.QAA12200@beta.informatik.hu-berlin.de> <20010402112428.A12039@dman.com> <3ACA2CC7.69FF9B8D@u.genie.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3ACA2CC7.69FF9B8D@u.genie.co.uk>; from opk@u.genie.co.uk on Tue, Apr 03, 2001 at 09:04:23PM +0100 > Hopefully nobody feels the need to write a completion for it just yet > because we haven't decided on how to cope with that situation yet. Presumably one could use a similar OS detection test. > Wouldn't it make sense to use $OSTYPE like we do in other places such as > _mount? It would allow the FreeBSD and OpenBSD parts to be actually > usable and is probably sufficient intelligence for this. You could argue > that we should call apm and try to work out what it is but $OSTYPE is > going to be faster. Fair enough. Index: Completion/Unix/Command/_apm =================================================================== RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_apm,v retrieving revision 1.1 diff -u -r1.1 _apm --- Completion/Unix/Command/_apm 2001/04/02 19:21:18 1.1 +++ Completion/Unix/Command/_apm 2001/04/03 21:26:24 @@ -1,9 +1,6 @@ #compdef apm -# this needs intelligence -local kludge=linux - -if [[ $kludge == "linux" ]] +if [[ $OSTYPE == linux* ]] then _arguments -C -s \ @@ -22,7 +19,7 @@ '(--ignore)-i[tell the system to ignore system-generated APM message]' \ '(-i)--ignore[tell the system to ignore system-generated APM message]' -elif [[ $kludge == "freebsd4.1" ]] +elif [[ $OSTYPE == freebsd* ]] then _arguments -C \ @@ -38,7 +35,7 @@ '-Z[transition system into standby mode]' \ '-z[suspend the system]' -elif [[ $kludge == "openbsd2.7" ]] +elif [[ $OSTYPE == openbsd* ]] then _arguments -C \