From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" Date: Thu, 23 Nov 2017 18:26:52 +0200 Message-ID: <8360a1arlf.fsf@gnu.org> References: <87tvy9rm5z.fsf@gmail.com> <87lgjk7rpd.fsf@users.sourceforge.net> <87lgjkoloe.fsf@gmail.com> <87shd5znzf.fsf@users.sourceforge.net> <87po891o1t.fsf@gmail.com> <87po89ywv5.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1511454503 16042 195.159.176.226 (23 Nov 2017 16:28:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 23 Nov 2017 16:28:23 +0000 (UTC) Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 23 17:28:19 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHuME-0003R9-CK for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 17:28:10 +0100 Original-Received: from localhost ([::1]:45088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHuML-0003ln-Kx for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Nov 2017 11:28:17 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHuMF-0003lf-GQ for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 11:28:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHuM7-0003dT-JV for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 11:28:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:45373) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eHuM7-0003cm-Fm for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 11:28:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eHuM5-0007XI-MB for bug-gnu-emacs@gnu.org; Thu, 23 Nov 2017 11:28:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 23 Nov 2017 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29157 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29157-submit@debbugs.gnu.org id=B29157.151145443728917 (code B ref 29157); Thu, 23 Nov 2017 16:28:01 +0000 Original-Received: (at 29157) by debbugs.gnu.org; 23 Nov 2017 16:27:17 +0000 Original-Received: from localhost ([127.0.0.1]:54054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHuLM-0007WL-Vh for submit@debbugs.gnu.org; Thu, 23 Nov 2017 11:27:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:44272) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHuLK-0007W7-FL for 29157@debbugs.gnu.org; Thu, 23 Nov 2017 11:27:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eHuL9-0002Iy-IO for 29157@debbugs.gnu.org; Thu, 23 Nov 2017 11:27:09 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38922) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eHuL9-0002Ib-3Q; Thu, 23 Nov 2017 11:27:03 -0500 Original-Received: from [176.228.60.248] (port=1947 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eHuL7-0006Eb-R6; Thu, 23 Nov 2017 11:27:02 -0500 In-reply-to: <87po89ywv5.fsf@users.sourceforge.net> (message from Noam Postavsky on Thu, 23 Nov 2017 07:59:10 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140267 Archived-At: > From: Noam Postavsky > Date: Thu, 23 Nov 2017 07:59:10 -0500 > Cc: 29157@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.