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

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

bug#18875: 25.0.50; Dired -- add support for ls --time-style with a spac


From: Lars Ingebrigtsen
Subject: bug#18875: 25.0.50; Dired -- add support for ls --time-style with a space
Date: Thu, 19 Aug 2021 16:15:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Keith David Bershatsky <esq@lawlist.com> writes:

> Thank you, Eli, for taking a look at this report (#18875).
>
> `hour:minute:seconds` is omitted because there is a space between the
> date and the time.
>
> C-u C-x d
>
> -alh --group-directories-first --time-style=+%m-%d-%Y %H:%M:%S

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

These are things that has to be understandable to the shell, so you have
to quote things appropriately for the shell.

So I'd expect this to work:

C-u C-x d
-alh --group-directories-first --time-style="+%m-%d-%Y %H:%M:%S"

But it doesn't;

(insert-directory "/tmp/" "-alh --time-style=\"+%m-%d-%Y %H:%M:%S\"")

fails.

(split-string-and-unquote "-alh --time-style=\"+%m-%d-%Y %H:%M:%S\"")
=> ("-alh" "--time-style=" "+%m-%d-%Y %H:%M:%S")

However, this works:

(insert-directory "/tmp/" "-alh \"--time-style=+%m-%d-%Y %H:%M:%S\"")

So...  dired supports spaces in command line arguments, but you have to
quote the argument, so I'm closing this bug report.  However, there's a
bug in `split-string-and-unquote', so I'm opening a new report for that.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

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