zsh-workers
 help / color / mirror / code / Atom feed
* Re: Functions moved
@ 2001-04-02 14:41 Sven Wischnowsky
  2001-04-02 15:24 ` Clint Adams
  0 siblings, 1 reply; 6+ messages in thread
From: Sven Wischnowsky @ 2001-04-02 14:41 UTC (permalink / raw)
  To: zsh-workers


Clint Adams wrote:

> > Linux/Command sounds reasonable to me.
> 
> I take that back.  This is going to cause the same sort of problems
> that Bart wanted to avoid with the initscript conflict.
> 
> Non-linux operating systems have apm commands too.

Hrm.  Any idea how they look like?  Option-wise?

Otherwise I agree with Oliver that we should just add a Linux/Command
directory and put it there for now.


Anyway.  I'm sorry, but I have to go now, more tomorrow (no doubt
about that I'd guess).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Functions moved
  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-03 20:04   ` _apm (was Re: Functions moved) Oliver Kiddle
  0 siblings, 2 replies; 6+ messages in thread
From: Clint Adams @ 2001-04-02 15:24 UTC (permalink / raw)
  To: Sven Wischnowsky; +Cc: zsh-workers

> Hrm.  Any idea how they look like?  Option-wise?

Yup.  Here's Solaris 8.  It apparently has nothing to do with power
management, but rather something related to sadmind.  I think.

Usage:  apm  -c class [version]  -m method  [-h host]  [-d domain]
             [-t AuthType]  [-f AuthFlavor]  [-g ClientGroup]  [-n | -p]
             [-x AckSecs AckUsecs]  [-y RepSecs RepUsecs]
             [-k PingCnt]  [-w PingSecs PingUsecs]  [-i DelaySecs DelayUsecs]
             [-r ServerProg ServerVers]  [-u [file]]  [-l]
             [-D DebugCategories]  [-a name[=value] name[=value] ...]

And this is for FreeBSD 4.1:

Index: Completion/Linux/_apm
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Linux/_apm,v
retrieving revision 1.1
diff -u -r1.1 _apm
--- Completion/Linux/_apm	2001/04/01 01:12:07	1.1
+++ Completion/Linux/_apm	2001/04/02 15:19:25
@@ -1,4 +1,11 @@
 #compdef apm
+
+# this needs intelligence
+local kludge=linux
+
+if [[ $kludge == "linux" ]]
+then
+
 _arguments -C -s \
     '(--version)-V[print the apm program and exit immediately]' \
     '(-V)--version[print the apm program and exit immediately]' \
@@ -15,3 +22,19 @@
     '(--ignore)-i[tell the system to ignore system-generated APM message]' \
     '(-i)--ignore[tell the system to ignore system-generated APM message]'
 
+else
+     
+_arguments -C \
+     '-a[display AC line status]' \
+     '-b[display battery status]' \
+     '-d[disable/enable display suspension]:bool:' \
+     '-e[disable/enable apm functions]:bool:' \
+     '-h[disable/enable HLT in kernel context switch]:bool:' \
+     '-l[display remaining battery percentage]' \
+     '-r[enable resume wakeup timer]' \
+     '-s[display status of APM support]' \
+     '-t[display estimated remaining battery life in seconds]' \
+     '-Z[transition system into standby mode]' \
+     '-z[suspend the system]'
+
+fi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Functions moved
  2001-04-02 20:06   ` Chmouel Boudjnah
@ 2001-04-02 19:19     ` Clint Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Clint Adams @ 2001-04-02 19:19 UTC (permalink / raw)
  To: Chmouel Boudjnah; +Cc: Sven Wischnowsky, zsh-workers

> isn't that possible to have the configure script to detect the system
> and let install the FBSD or Linux (or whatever) version ?

It's possible, but I think that this would cause problems if someone
wants to share the file over different architectures.

I'll commit this for OpenBSD in the midst of moving it to Unix/Command:

_arguments -C \
     '-z[engage suspend mode]' \
     '-S[engage stand-by mode]' \
     '-l[display estimated battery lifetime percentage]' \
     '-m[display estimated battery lifetime minutes]' \
     '-b[display battery status]' \
     '-a[display AC line status]' \
     '-v[verbose]' \
     '-f[socket]:sockname:_files'

fi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Functions moved
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Chmouel Boudjnah @ 2001-04-02 20:06 UTC (permalink / raw)
  To: Clint Adams; +Cc: Sven Wischnowsky, zsh-workers

Clint Adams <schizo@debian.org> writes:

> > Hrm.  Any idea how they look like?  Option-wise?
> 
> Yup.  Here's Solaris 8.  It apparently has nothing to do with power
> management, but rather something related to sadmind.  I think.

[...]

> 
> And this is for FreeBSD 4.1:

isn't that possible to have the configure script to detect the system
and let install the FBSD or Linux (or whatever) version ?

>  #compdef apm
> +
> +# this needs intelligence
> +local kludge=linux

-- 
MandrakeSoft Inc                     http://www.chmouel.org
                      --Chmouel


^ permalink raw reply	[flat|nested] 6+ messages in thread

* _apm (was Re: Functions moved)
  2001-04-02 15:24 ` Clint Adams
  2001-04-02 20:06   ` Chmouel Boudjnah
@ 2001-04-03 20:04   ` Oliver Kiddle
  2001-04-03 21:26     ` Clint Adams
  1 sibling, 1 reply; 6+ messages in thread
From: Oliver Kiddle @ 2001-04-03 20:04 UTC (permalink / raw)
  To: Clint Adams; +Cc: Zsh workers

Clint Adams wrote:

> Yup.  Here's Solaris 8.  It apparently has nothing to do with power
> management, but rather something related to sadmind.  I think.

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.

> And this is for FreeBSD 4.1:

> +# this needs intelligence
> +local kludge=linux
> +
> +if [[ $kludge == "linux" ]]
> +then

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.

Oliver


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: _apm (was Re: Functions moved)
  2001-04-03 20:04   ` _apm (was Re: Functions moved) Oliver Kiddle
@ 2001-04-03 21:26     ` Clint Adams
  0 siblings, 0 replies; 6+ messages in thread
From: Clint Adams @ 2001-04-03 21:26 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: Zsh workers

> 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 \


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-04-03 21:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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).