# HG changeset patch # User Rik # Date 1384303422 28800 # Node ID 7df8f5372ea887cfec5bd3b6bd80c7985b1ebdfd # Parent 6a381b9ae05595dcd1133181f56a9a22e1bc0be8 doc: Add note about wildcard expansion in ls and dir functions (bug #40544). * dir.m, ls.m: Add note about wildcard expansion (bug #40544). diff -r 6a381b9ae055 -r 7df8f5372ea8 scripts/miscellaneous/dir.m --- a/scripts/miscellaneous/dir.m Tue Nov 12 15:11:17 2013 -0800 +++ b/scripts/miscellaneous/dir.m Tue Nov 12 16:43:42 2013 -0800 @@ -47,9 +47,13 @@ ## @end table ## ## If @var{directory} is a filename, rather than a directory, then return -## information about the named file. @var{directory} may be a list of -## directories specified either by name or with wildcard characters (like * -## and ?) which will be expanded with @code{glob}. +## information about the named file. @var{directory} may also be a list rather +## than a single directory or file. +## +## @var{directory} is subject to shell expansion if it contains any wildcard +## characters @samp{*}, @samp{?}, @samp{[]}. If you want to find a +## literal example of a wildcard character you must escape it using the +## backslash operator @samp{\}. ## ## Note that for symbolic links, @code{dir} returns information about ## the file that the symbolic link points to rather than the link itself. diff -r 6a381b9ae055 -r 7df8f5372ea8 scripts/miscellaneous/ls.m --- a/scripts/miscellaneous/ls.m Tue Nov 12 15:11:17 2013 -0800 +++ b/scripts/miscellaneous/ls.m Tue Nov 12 16:43:42 2013 -0800 @@ -17,7 +17,10 @@ ## . ## -*- texinfo -*- -## @deftypefn {Command} {} ls options +## @deftypefn {Command} {} ls +## @deftypefnx {Command} {} ls filenames +## @deftypefnx {Command} {} ls options +## @deftypefnx {Command} {} ls options filenames ## List directory contents. For example: ## ## @example @@ -30,8 +33,13 @@ ## @end example ## ## The @code{dir} and @code{ls} commands are implemented by calling your -## system's directory listing command, so the available options may vary +## system's directory listing command, so the available options will vary ## from system to system. +## +## Filenames are subject to shell expansion if they contain any wildcard +## characters @samp{*}, @samp{?}, @samp{[]}. If you want to find a +## literal example of a wildcard character you must escape it using the +## backslash operator @samp{\}. ## @seealso{dir, readdir, glob, what, stat, filesep, ls_command} ## @end deftypefn