Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: a compdef for FreeBSD's sysctl(8) command



At Tue, 03 Jul 2001 11:49:02 +0100,
Oliver Kiddle wrote:
> First though, I've just tried to adapt it to also work for Linux. I
> also replaced your function with a substitution which I think should
> do the same thing so I would appreciate if you could check that the
> updated function below still works.

Thanks, I'm no zsh compdef hacker at all.  Please fix it as
appropriate.

> I don't suppose that $OSTYPE on FreeBSD includes any of the FreeBSD
> version. It is just that it is a tiny bit faster to check than
> `uname -sr`?

Oh, I didn't think of $OSTYPE.  On FreeBSD, its value looks like
"freebsd4.3" or "freebsd5.0" and on Linux it'd be "linux-gnu".

Why not use it then? :)

> If `sysctl -A' or `sysctl -aN' is run as a non-root user, do you get
> any output to stderr (you do on Linux)? If so, we need to add a
> redirection.

No, we don't get any stderr output on FreeBSD.

> Does anyone on zsh-workers mind if I put this on the stable branch.
> Mainly because I suspect the FreeBSD folks would otherwise be
> maintaining it as a patch for their port.

Indeed..  We'd appreciate seeing it in the stable releases.

Regards,

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Freeze this moment a little bit longer, make each impression
  a little bit stronger..  Experience slips away -- Time stand still"



Messages sorted by: Reverse Date, Date, Thread, Author