unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: John Wiegley <johnw@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29157@debbugs.gnu.org, ambrevar@gmail.com,
	npostavs@users.sourceforge.net
Subject: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed"
Date: Thu, 21 Dec 2017 00:17:50 -0800	[thread overview]
Message-ID: <m2wp1go5ox.fsf@newartisans.com> (raw)
In-Reply-To: <83375075ww.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 27 Nov 2017 05:32:31 +0200")

>>>>> "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	other threads:[~2017-12-21  8:17 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-05 11:37 bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed" Pierre Neidhardt
2017-11-05 13:58 ` Noam Postavsky
2017-11-05 14:16   ` Pierre Neidhardt
2017-11-23  3:13     ` Noam Postavsky
2017-11-23  6:55       ` Pierre Neidhardt
2017-11-23 12:59         ` Noam Postavsky
2017-11-23 16:26           ` Eli Zaretskii
2017-11-25 17:54             ` Pierre Neidhardt
2017-11-25 18:32               ` Michael Albinus
2017-11-25 18:35                 ` Pierre Neidhardt
2017-11-25 18:50               ` Noam Postavsky
2017-11-25 19:50                 ` Eli Zaretskii
2017-11-25 20:06                   ` Noam Postavsky
2017-11-25 20:25                     ` Eli Zaretskii
2017-11-25 21:41                       ` Noam Postavsky
2017-11-26  3:35                         ` Eli Zaretskii
2017-11-26  3:21                   ` John Wiegley
2017-11-26 15:35                     ` Eli Zaretskii
2017-11-26 21:44                       ` John Wiegley
2017-11-25 19:29               ` Eli Zaretskii
2017-11-25 19:36                 ` Pierre Neidhardt
2017-11-25 19:57                   ` Eli Zaretskii
2017-11-26  9:17                     ` Pierre Neidhardt
2017-11-26 15:53                       ` Eli Zaretskii
2017-11-26  3:21                 ` John Wiegley
2017-11-26 15:33                   ` Eli Zaretskii
2017-11-26 21:45                     ` John Wiegley
2017-11-27  3:32                       ` Eli Zaretskii
2017-12-21  8:17                         ` John Wiegley [this message]
2017-12-03 20:43         ` Noam Postavsky
2017-12-04  8:43           ` John Wiegley
2017-12-04 12:51             ` Noam Postavsky
2017-11-05 15:16   ` Andreas Schwab
2017-11-10  2:04     ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wp1go5ox.fsf@newartisans.com \
    --to=johnw@gnu.org \
    --cc=29157@debbugs.gnu.org \
    --cc=ambrevar@gmail.com \
    --cc=eliz@gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).