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

From: Noam Postavsky <[email-masked]>
Date: Sat, 25 Nov 2017 16:41:52 -0500

Eli Zaretskii <[email-masked]> writes:

>> How about checking for a set of arguments that is compatible with what
>> current-time-string accepts.
>
> Is it really possible to do that reliably?

Should be okay if we err on the side of current-time-string:

  (pcase (cl-list* (nth 0 args) (nth 1 args) (nthcdr 2 args)))
    (`(,(or (pred listp) (pred integerp))
       ,(or 'nil 't 'wall (pred stringp)))
     t))

> Or maybe you meant to catch errors signaled by current-time-string,

That's another possibility, it would be more precise.

> and invoke the external command then.  If so, I'd agree.  But we
> should then allow customization of the external command's name,
> because on Windows it will be something like 'gdate', to avoid calling
> the incompatible Windows shell's built-in (which also prompts
> interactively for input).

I'm not in front of a Windows box at the moment, but I thought a cmd.exe
builtin like that could only be invoked by doing calling "cmd /C date".