zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: Oliver Kiddle <opk@u.genie.co.uk>
Cc: Zsh workers <zsh-workers@sunsite.dk>
Subject: Re: _apm (was Re: Functions moved)
Date: Tue, 3 Apr 2001 17:26:54 -0400	[thread overview]
Message-ID: <20010403172654.A9126@dman.com> (raw)
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 \


      reply	other threads:[~2001-04-03 21:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-02 14:41 Functions moved Sven Wischnowsky
2001-04-02 15:24 ` Clint Adams
2001-04-02 20:06   ` Chmouel Boudjnah
2001-04-02 19:19     ` Clint Adams
2001-04-03 20:04   ` _apm (was Re: Functions moved) Oliver Kiddle
2001-04-03 21:26     ` Clint Adams [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010403172654.A9126@dman.com \
    --to=schizo@debian.org \
    --cc=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).