Mercurial > octave
diff scripts/miscellaneous/ls.m @ 30953:230724ab2977
maint: Merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 21 Apr 2022 18:32:33 +0200 |
parents | 9d7ec294af2b 6397b6d7c42e |
children | cd741166d6fb |
line wrap: on
line diff
--- a/scripts/miscellaneous/ls.m Thu Apr 21 17:54:21 2022 +0200 +++ b/scripts/miscellaneous/ls.m Thu Apr 21 18:32:33 2022 +0200 @@ -76,10 +76,12 @@ args = regexprep (args, '\\(?![\*\?\[\]])', '/'); ## Enclose paths, potentially having spaces, in double quotes: args = strcat ('"', args, '"'); - ## Exclude glob patterns from quoted part of FILENAMES string + ## Exclude glob patterns and escaped characters from quoted part of + ## FILENAMES string args = regexprep (args, '(?<!\\)([\*\?])', '"$1"'); args = regexprep (args, '(?<!\\)\[', '"['); args = regexprep (args, '(?<!\\)\[', ']"'); + args = regexprep (args, '(\\.)', '"$1"'); else idx = ! strncmp (args, '/', 1); ## Enclose paths, potentially having spaces, in double quotes: