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: Noam Postavsky
Subject: bug#29157: 25.3; Eshell parsing fails sometimes, e.g. "date" and "sed"
Date: Sat, 25 Nov 2017 16:41:52 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> 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".





reply via email to

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