Mercurial > hg > octave-nkf
changeset 17908:7df8f5372ea8
doc: Add note about wildcard expansion in ls and dir functions (bug #40544).
* dir.m, ls.m: Add note about wildcard expansion (bug #40544).
author | Rik <rik@octave.org> |
---|---|
date | Tue, 12 Nov 2013 16:43:42 -0800 |
parents | 6a381b9ae055 |
children | 88c37cf66fb5 |
files | scripts/miscellaneous/dir.m scripts/miscellaneous/ls.m |
diffstat | 2 files changed, 17 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/miscellaneous/dir.m +++ b/scripts/miscellaneous/dir.m @@ -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.
--- a/scripts/miscellaneous/ls.m +++ b/scripts/miscellaneous/ls.m @@ -17,7 +17,10 @@ ## <http://www.gnu.org/licenses/>. ## -*- 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