It would be useful if 'eshell-command-result' inherited the set of
environment variables from the invoking shell, since this would make
it more convenient to write eshell functions.
Consider the following example: a function that invokes snmpget on a
remote machine, whose hostname is passed as an argument. The snmpget
command uses an environment variable MIBS; even if this is set (using
"export MIBS=/path/to/the/mib") in the eshell session, it isn't
propagated to the snmp-uptime command.
Is there is a better way to run external commands? The following
example is simplified; I really want to do a regexp search on the
results of snmpget.
(defun eshell/snmp-uptime (&rest args)
(format "snmpget %s public cpuUpTime.0" (first args))))
[I know about the -m option to snmpget]
Eric Marsden <URL:http://www.laas.fr/~emarsden/>