GNU bug report logs -
#29157
25.3; Eshell parsing fails sometimes, e.g. "date" and "sed"
Previous Next
Reported by: Pierre Neidhardt <ambrevar <at> gmail.com>
Date: Sun, 5 Nov 2017 11:38:02 UTC
Severity: normal
Found in version 25.3
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> users.sourceforge.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Noam Postavsky <npostavs <at> users.sourceforge.net>
> Date: Thu, 23 Nov 2017 07:59:10 -0500
> Cc: 29157 <at> debbugs.gnu.org
>
> > Disabling eshell/date makes Eshell less portable on one system at least,
> > that is Windows. But what does "portability" mean in this context? Are
> > the coreutils meant to be part of Eshell? Why? Supporting `date' but not
> > its arguments does not make up for actual portability I believe. Case
> > in point: I got fooled.
> >
> > Let's take the case of BSD vs. GNU: bash or zsh do not wrap around `ls',
> > so the behaviour will not be the same on BSD and GNU. Why should Eshell
> > be any different?
>
> Eshell isn't exactly the same as bash or zsh. You can use M-x shell if
> you prefer them.
>
> We could fallback to the external command if given arguments. This is
> being done currently for other commands like eshell/rm (for unrecognized
> arguments, that is).
That doesn't sound right to me (for rm as well): it will fail in
strange ways for systems where the external command is absent or
deficient.
Eshell has both internal and external implementations because it wants
to be able to handle Lisp objects and Lisp-like syntax, not just
files, pipes, and other shell stuff. So people who expect Eshell to
be just another shell are expecting something that Eshell was never
designed to be. That's why Eshell offers the possibility to
optionally invoke the external implementation -- but it should be done
explicitly by the users, not by us second-guessing what they mean,
because reliably guessing which arguments are for an external command
and which for the internal Eshell implementation is impossible.
Observe:
~/git/emacs/branch $ date 42
Wed Dec 31 19:00:42 1969
But
~/git/emacs/branch $ *date 42
/bin/date: invalid date ‘42’
So I'm not sure such a naïve solution is TRT in this case, because we
are losing valuable features by doing that, and those features are not
just an accident, they were intentionally included in Eshell.
This bug report was last modified 7 years and 159 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.