[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Loops and scripting in eshell
From: |
David Kastrup |
Subject: |
Re: Loops and scripting in eshell |
Date: |
21 Oct 2003 11:05:36 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
Oliver Scholz <alkibiades@gmx.de> writes:
> Kai Grossjohann <kai.grossjohann@gmx.net> writes:
>
> > David Kastrup <dak@gnu.org> writes:
> >
> >> for f in ${ls -1} { echo $f; }
> >
> > Hm. The fact that the -1 is needed hints at some potential
> > problem. In the shell, ls behaves differently. (The -1 is not
> > needed there.) So maybe some other programs break when used in a
> > similar way?
Uh, ls does not "break". ls is an eshell builtin, and so behaves
completely different.
> > (I guess the difference has to do with isatty(3). No idea how
> > difficult would it be for eshell to do this right.)
Oh, nonsense. The difference is that we are not talking /bin/ls here.
> > What do people think? [...]
>
> I don't know about the isatty issue. I don't know much about the
> underlying lower operating system level. But I'd like to note, that
> it seems to work in *some* directories, but not in others:
>
> [lisp] $ for f in ${ls} {echo $f}
> 2cyr.txt draw.el iso646-de.el single-frame.el
>
> *much more output snipped*
Well, it lists all the lines that "ls" spews out. If it worked as
"intended", you'd get a single line per entry. without color
attributes. But eshell ls does something different.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Re: Inject some eshell features into shell?, (continued)
Loops and scripting in eshell (was: Inject some eshell features into shell?), Oliver Scholz, 2003/10/19
- Re: Loops and scripting in eshell, Kai Grossjohann, 2003/10/19
- Message not available
- Re: Loops and scripting in eshell, Oliver Scholz, 2003/10/19
- Re: Loops and scripting in eshell, Oliver Scholz, 2003/10/19
- Re: Loops and scripting in eshell, David Kastrup, 2003/10/19
- Re: Loops and scripting in eshell, Kai Grossjohann, 2003/10/20
- Re: Loops and scripting in eshell, Oliver Scholz, 2003/10/21
- Re: Loops and scripting in eshell,
David Kastrup <=
- Re: Loops and scripting in eshell, Kai Grossjohann, 2003/10/21
Re: Loops and scripting in eshell, Reiner Steib, 2003/10/20
Re: Inject some eshell features into shell?, Matthias Meulien, 2003/10/22