GNU bug report logs - #29157
25.3; Eshell parsing fails sometimes, e.g. "date" and "sed"

Previous Next

Package: emacs;

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


Message #106 received at 29157 <at> debbugs.gnu.org (full text, mbox):

From: John Wiegley <johnw <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: npostavs <at> users.sourceforge.net, 29157 <at> debbugs.gnu.org, ambrevar <at> gmail.com
Subject: Re: bug#29157: 25.3;
 Eshell parsing fails sometimes, e.g. "date" and "sed"
Date: Thu, 21 Dec 2017 00:17:50 -0800
>>>>> "EZ" == Eli Zaretskii <eliz <at> gnu.org> writes:

EZ> If someone wants to work on Eshell's 'date' so that it accepts more
EZ> complicated arguments that the Coreutils version does, they should feel
EZ> free, of course.

I imagine it would start somewhere like this:

--8<---------------cut here---------------start------------->8---
(defun eshell/date (&rest args)
  "Implementation of date in Lisp."
  (setq args (eshell-flatten-list args))
  (eshell-eval-using-options
   "rm" args
   '(
     (?d  "date"      nil nil "display time described by STRING, not 'now'")
     (nil "debug"     nil nil "annotate the parsed date and warn about questionable usage")
     (?f  "file"      nil nil "like --date; once for each line of DATEFILE")
     (?I  "iso-8601"  nil nil "output date/time in ISO 8601 format")
     (?R  "rfc-email" nil nil "output date and time in RFC 5322 format")
     (nil "rfc-3339"  nil nil "output date/time in RFC 3339 format")
     (?r  "reference" nil nil "display the last modification time of FILE")
     (?s  "set"       nil nil "set time described by STRING")
     (?u  "utc"       nil nil "print or set Coordinated Universal Time (UTC)")
     (nil "universal" nil nil "print or set Coordinated Universal Time (UTC)")
     (nil "help"      nil nil "display this help and exit")
     (nil "version"   nil nil "output version information and exit")
     :preserve-args
     :external "date"
     :show-usage
     :usage "[OPTION]... [+FORMAT]
Display the current time in the given FORMAT, or set the system date.")
   (while args
     (let ((entry (car args)))
       )
     (setq args (cdr args)))
   nil))
--8<---------------cut here---------------end--------------->8---

--
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2




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.