[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loops and scripting in eshell

From: Kai Grossjohann
Subject: Re: Loops and scripting in eshell
Date: Sun, 19 Oct 2003 17:06:53 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (berkeley-unix)

Oliver Scholz <> writes:

> Kai Grossjohann <> writes:
>> Even though I now know how to do for loops in eshell, I was wondering
>> if the following idea might be fun to play with.  Maybe someone has
>> already done this and would like to share?
> [...]
> Loops are the one feature that I am missing in eshell.

for f in a b { echo $f; }               # invokes shell command echo
for f in a b ( find-file f )            # invokes Lisp command

It's quite cool, actually, though the syntax is not very Bourne-ish.

How to do two Lisp commands?  Hm.  Oh.  Very interesting.  Compare:

for f in a b (progn (message f) (sit-for 1))
for f in a b { (message f); sleep 1 }

It changes the behavior of `message'!
Two cafe au lait please, but without milk.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]