changeset 30960:98bff9749345

maint: Merge stable to default.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 22 Apr 2022 08:55:26 +0200
parents 8a8f82c0235e (current diff) d585976cb30a (diff)
children b9e4d91d20ce
files scripts/miscellaneous/ls.m
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/ls.m	Thu Apr 21 14:52:35 2022 -0700
+++ b/scripts/miscellaneous/ls.m	Fri Apr 22 08:55:26 2022 +0200
@@ -71,8 +71,8 @@
 
     if (ispc () && ! isunix ())
       if (strncmp (ls_cmd, "ls", 2))
-        ## Replace backslashes with forward slashes (unless they escape a glob
-        ## pattern)
+        ## Replace backslashes with forward slashes (unless they escape a
+        ## wildcard character)
         args = regexprep (args, '\\(?![*?\[\]])', '/');
         ## Enclose paths, potentially having spaces, in double quotes:
         args = strcat ('"', args, '"');
@@ -80,7 +80,7 @@
         ## FILENAMES string
         args = regexprep (args, '(?<!\\)([*?])', '"$1"');
         args = regexprep (args, '(?<!\\)\[', '"[');
-        args = regexprep (args, '(?<!\\)\[', ']"');
+        args = regexprep (args, '(?<!\\)\]', ']"');
         args = regexprep (args, '(\\.)', '"$1"');
       else
         idx = ! strncmp (args, '/', 1);