changeset 30959:d585976cb30a stable

ls.m: Fix typo (bug #62282).
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 22 Apr 2022 08:54:49 +0200
parents 0d06084693dd
children 98bff9749345 42cf34140699
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 13:46:49 2022 -0700
+++ b/scripts/miscellaneous/ls.m	Fri Apr 22 08:54:49 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);