On Mon, Jan 24, 2011 at 09:51:30AM +0800, jida...@jidanni.org wrote:
> X-debbugs-Cc: adr...@cam.cornell.edu
> Package: units
> Version: 1.87-2
> Severity: wishlist
> 
> Perhaps add a units --list to list all units the program knows about,
> even though there are much better ways to get that info.
> Still, users will be looking for it.
> 
> Or at least on the --help message add
>    To list all the units the units program knows about, do ....

I don't believe there is any fully automated "nice" way to produce such a
list.  I guess a question is why you want the list.  

Something like this will display the database:

more `./units --version | sed -n 's/.*database in //p'`

That's good for humans, but not people. You can get that same result
by doing "help <meter>" though you might have issues with paging
backwards in some pagers.  I could add a line to the help that says:
"To see the units definitions look in the file <filename>."

Doing "units --check-verbose" will give you a list of all units but
it's a bit cluttered (and more so if there are any errors).
I suppose this might serve:

./units --check-verbose | sed -n "s/doing '\(.*\)'/\1/p"

>From within the program you can do "search a" for example to get all
units containing "a", but there's no way to get *all* units.  This
list is formatted in two columns with the definition on the right.  A
simple list of all the units is a bit much for human consumption.  




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to