unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 18875@debbugs.gnu.org
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	[thread overview]
Message-ID: <877dgh7c79.fsf@gnus.org> (raw)
In-Reply-To: <m2mw8g6ryj.wl%esq@lawlist.com> (Keith David Bershatsky's message of "Tue, 28 Oct 2014 10:10:12 -0700")

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	other threads:[~2021-08-19 14:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 16:44 bug#18875: 25.0.50; Dired -- add support for ls --time-style with a space Keith David Bershatsky
2014-10-28 17:04 ` Eli Zaretskii
2014-10-28 17:10 ` Keith David Bershatsky
2021-08-19 14:15   ` Lars Ingebrigtsen [this message]
2021-08-19 14:21     ` Lars Ingebrigtsen
2021-08-22  8:32       ` Juri Linkov
2021-08-22 15:00         ` Lars Ingebrigtsen
2021-08-23  7:18           ` Juri Linkov
2014-10-28 17:33 ` Keith David Bershatsky

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=877dgh7c79.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=18875@debbugs.gnu.org \
    --cc=esq@lawlist.com \
    /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).