bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed"


From: John Wiegley
Subject: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed"
Date: Thu, 21 Dec 2017 00:17:50 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (darwin)

>>>>> "EZ" == Eli Zaretskii <eliz@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





reply via email to

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