changeset 30952:c09fdabaa5b6 stable

dir.m: Clarify wildcard behavior on Windows in docstring (bug #62282).
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 21 Apr 2022 18:31:33 +0200
parents 6397b6d7c42e
children 230724ab2977 0acf9363da34
files scripts/miscellaneous/dir.m
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/miscellaneous/dir.m	Thu Apr 21 18:30:25 2022 +0200
+++ b/scripts/miscellaneous/dir.m	Thu Apr 21 18:31:33 2022 +0200
@@ -61,9 +61,13 @@
 ## than a single directory or file.
 ##
 ## @var{directory} is subject to shell expansion if it contains any wildcard
-## characters @samp{*}, @samp{?}, @samp{[]}.  To find a literal example of a
-## wildcard character the wildcard must be escaped using the backslash operator
-## @samp{\}.
+## characters @samp{*}, @samp{?}, @samp{[]}.  If these wildcard characters are
+## escaped with a backslash @samp{\} (e.g., @samp{\*}) on a POSIX platform,
+## they aren't treated as wildcards but as the corresponding literal character.
+## On Windows, it is not possible to escape wildcard characters because
+## backslash @samp{\} is treated as a file separator.  On Windows, use
+## @code{ls} instead for file or folder names that contain characters that
+## would be treated as wildcards by @code{dir}.
 ##
 ## Note that for symbolic links, @code{dir} returns information about the
 ## file that the symbolic link points to rather than the link itself.