# HG changeset patch # User Rik # Date 1669300222 28800 # Node ID e3256a6e2e8e8f153d7a5504b919d9629d4c7384 # Parent 5fdfd21ce7c9e0a16040ec21524c1cb61dc41b55# Parent 4b80982e0af8dd907ead4616b77449ec8501f71e maint: merge stable to default diff -r 5fdfd21ce7c9 -r e3256a6e2e8e doc/interpreter/basics.txi --- a/doc/interpreter/basics.txi Thu Nov 24 06:12:43 2022 -0800 +++ b/doc/interpreter/basics.txi Thu Nov 24 06:30:22 2022 -0800 @@ -65,14 +65,13 @@ Here is a complete list of the command line options that Octave accepts. - @table @code @item --built-in-docstrings-file @var{filename} @cindex @sortas{options, Octave command --built-in-docstrings-file} @ @ @code{--built-in-docstrings-file @var{filename}} Specify the name of the file containing documentation strings for the built-in functions of Octave. This value is normally correct and should -only need to specified in extraordinary situations. +only need to be specified in extraordinary situations. @item --debug @itemx -d @@ -84,8 +83,8 @@ @item --doc-cache-file @var{filename} @cindex @sortas{options, Octave command --doc-cache-file} @ @ @code{--doc-cache-file @var{filename}} -Specify the name of the doc cache file to use. The value of @var{filename} -specified on the command line will override any value of +Specify the name of the documentation cache file to use. The value of +@var{filename} specified on the command line will override any value of @w{@env{OCTAVE_DOC_CACHE_FILE}} found in the environment, but not any commands in the system or user startup files that use the @code{doc_cache_file} function. @@ -287,16 +286,17 @@ Print the program version number and exit. @item @var{file} -Execute commands from @var{file}. Exit when done unless -@option{--persist} is also specified. +Execute commands from @var{file}. Exit when done unless @option{--persist} is +also specified. @end table -Octave also includes several functions which return information -about the command line, including the number of arguments and all of the -options. +Octave also includes several functions which return information about the +command line, including the number of arguments and all of the options. @DOCSTRING(argv) +@DOCSTRING(cmdline_options) + @DOCSTRING(program_name) @DOCSTRING(program_invocation_name) diff -r 5fdfd21ce7c9 -r e3256a6e2e8e doc/interpreter/doccheck/mk_undocumented_list --- a/doc/interpreter/doccheck/mk_undocumented_list Thu Nov 24 06:12:43 2022 -0800 +++ b/doc/interpreter/doccheck/mk_undocumented_list Thu Nov 24 06:30:22 2022 -0800 @@ -173,9 +173,11 @@ upper ylabel ylim +ytickangle yticklabels yticks zlabel zlim +ztickangle zticklabels zticks diff -r 5fdfd21ce7c9 -r e3256a6e2e8e libinterp/octave.cc --- a/libinterp/octave.cc Thu Nov 24 06:12:43 2022 -0800 +++ b/libinterp/octave.cc Thu Nov 24 06:30:22 2022 -0800 @@ -447,7 +447,7 @@ /* %!assert (islogical (isguirunning ())) -%!error isguirunning (1) +%!error isguirunning (1) */ DEFUN (argv, args, , @@ -468,6 +468,7 @@ If you write an executable Octave script, @code{argv} will return the list of arguments passed to the script. @xref{Executable Octave Programs}, for an example of how to create an executable Octave script. +@seealso{program_name, cmdline_options} @end deftypefn */) { if (args.length () != 0) @@ -478,14 +479,19 @@ /* %!assert (iscellstr (argv ())) -%!error argv (1) +%!error argv (1) */ DEFUN (cmdline_options, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{opt_struct} =} cmdline_options () -Return a structure containing info about the command line arguments passed to -Octave. +Return a structure containing detailed information about the command line +arguments passed to Octave. + +Programming Note: This function provides copious amounts of information about +Octave's parsing of command line options and may be more useful for debugging +Octave rather than for general use. +@seealso{argv, program_name} @end deftypefn */) { if (args.length () != 0) @@ -501,16 +507,23 @@ return ovl (opts.as_octave_value ()); } +/* +%!assert (isstruct (cmdline_options ())) +%!error cmdline_options (1) +*/ + DEFUN (program_invocation_name, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{name} =} program_invocation_name () -Return the name that was typed at the shell prompt to run Octave. +Return the string that was typed at the shell prompt to run Octave. + +The string may include path components as well as the program filename. If executing a script from the command line (e.g., @code{octave foo.m}) or using an executable Octave script, the program name is set to the name of the script. @xref{Executable Octave Programs}, for an example of how to create an executable Octave script. -@seealso{program_name} +@seealso{program_name, argv} @end deftypefn */) { if (args.length () != 0) @@ -521,15 +534,16 @@ /* %!assert (ischar (program_invocation_name ())) -%!error program_invocation_name (1) +%!error program_invocation_name (1) */ DEFUN (program_name, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{name} =} program_name () -Return the last component of the value returned by +Return the filename component of the value returned by @code{program_invocation_name}. -@seealso{program_invocation_name} + +@seealso{program_invocation_name, argv} @end deftypefn */) { if (args.length () != 0) @@ -540,7 +554,7 @@ /* %!assert (ischar (program_name ())) -%!error program_name (1) +%!error program_name (1) */ OCTAVE_NAMESPACE_END