Doug check this out. 
Protozilla rocks!
I think an interface like this should be part of xpcom base.

js> const NS_PIPELLA_CONTRACTID   = "@mozilla.org/protozilla/pipella;1";
js> var p                         =
Components.classes[NS_PIPELLA_CONTRACTID].createInstance();
js> p                             =
p.QueryInterface(Components.interfaces.nsIPipella);
[xpconnect wrapped nsIPipella]
js> p.exec("date");
Wed Dec 20 08:44:40 EST 2000

js> p.exec("which cvs");
/usr/bin/cvs

js> p.getEnv("SHELL");
/usr/local/bin/bash
js> p.getEnv("USER");
petejc
js> p.getEnv("EDITOR");
vi
js> p.exec('cvs -v');

Concurrent Versions System (CVS) 1.10.7 (client/server)

Copyright (c) 1989-1998 Brian Berliner, david d `zoo' zuhn,
                        Jeff Polk, and other authors

CVS may be copied only under the terms of the GNU General Public
License,
a copy of which can be found with the CVS distribution kit.

Specify the --help option for further information about CVS

js>

--pete

Reply via email to