GNU bug report logs -
#71935
split-string-and-unquote mishandles dired-listing-switches with '
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Thu, 4 Jul 2024 07:02:01 UTC
Severity: normal
Fixed in version 30.0.60
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Juri Linkov <juri <at> linkov.net>
> Cc: 71935 <at> debbugs.gnu.org
> Date: Fri, 05 Jul 2024 09:48:39 +0300
>
> >> Thanks, that's what I had in mind. Please install on the emacs-30
> >> branch.
> >
> > On second thought: could there be options that include shell
> > wildcards, which therefore should not be quoted? If so, perhaps
> > instead of shell-quote-argument we should use
> > shell-quote-wildcard-pattern?
>
> Indeed, there are ls switches that use wildcards, e.g.
> ‘--hide=PATTERN’ and ‘--ignore=PATTERN’. But it seems
> they are ignored anyway while using wildcards with 'ls -d',
> so I can't test them. What I can confirm only is that with
>
> 1. (setopt dired-listing-switches "-al --block-size='1 --ignore=system*")
> 2. C-x d /tmp/s*
>
> the switches are correctly quoted by 'shell-quote-wildcard-pattern':
>
> "ls -d --dired -N -al --block-size=\\'1 --ignore=system* -- s*"
Thanks. So I think this is a better solution for this tricky problem.
This bug report was last modified 1 year and 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.