eshell: eshell-command-result and environment

eshell: eshell-command-result and environment

Post by Eric Marsde » Tue, 16 Oct 2001 23:28:39



Hi,

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)
  (eshell-command-result
   (format "snmpget %s public cpuUpTime.0" (first args))))

[I know about the -m option to snmpget]

--
Eric Marsden                          <URL:http://www.laas.fr/~emarsden/>

 
 
 

1. Eshell-buffer-shorthand and Eshell completions

First, a bug: when I turn eshell-buffer-shorthand to true, my commands
stop producing any output at all, either when redirected or not.

I am using eshell 2.4.2 (which is budled with emacs 21.3.1). I tested
with 'emacs --no-init-file', so my .emacs is not in question.

Also, eshell will not complete to a file which is already on the
command line. Is there any way to turn this off?

     ps2pdf presentation.ps pre<tab>

When I hit tab, I want "pre" to complete to "presentation.ps". I will
change the extension ".ps" to ".pdf" myself. I just don't want to
retype "presentation" all over. For now, eshell refuses to complete
because "presentation.ps" is already on the command line -- even if
there is, in fact, a "presentation.ps" file in the current directory.

2. Rehash of Triaxsys Survey: Very Grim News

3. Eshell - a command equivalent to "clear"?

4. Space above footnote rule?

5. putting the status of the previous command into the eshell prompt?

6. designating a folder for shared libraries

7. eshell again: command list

8. NEED FLOPPY DRIVER FOR 68K

9. eshell ls directory completion adds separator

10. eshell display

11. eshell: bug in Makefile?

12. eshell and desktop.el conflict

13. eshell, term and ncurses