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

Re: PATCH: _units



On 2007-06-04 at 16:18 +0100, Peter Stephenson wrote:
> This implements completion for GNU units.  As noted, it's not that
> useful for some other implementations which don't take command line
> arguments, though for any that do and have a text data file it should be
> extensible.  The location of the data file can no doubt be in other
> places than the ones listed.

FreeBSD: /usr/share/misc/units.lib
I suspect that holds for all the modern *BSDs.

My completion-fu sucks; how would this be able to detect automatically
something like FreeBSD units(1), which uses -v for the version:

----------------------------8< cut here >8------------------------------
% units -v

  units version 1.0  Copyright (c) 1993 by Adrian Mariano
                    This program may be freely distributed
usage: units [-f unitsfile] [-q] [-v] [from-unit to-unit]
% 
----------------------------8< cut here >8------------------------------

-Phil



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