Here is a complete list of the command line options that Octave accepts.
--debug-d--doc-cache-file filenameOCTAVE_DOC_CACHE_FILE found in the environment, but not any commands
in the system or user startup files that use the doc_cache_file
function.
--echo-commands-x--eval code--persist is also
specified.
--exec-path pathOCTAVE_EXEC_PATH found in the environment, but not any commands
in the system or user startup files that set the built-in variable
EXEC_PATH.
--help-h-?--image-path pathOCTAVE_IMAGE_PATH found in the environment, but not any commands
in the system or user startup files that set the built-in variable
IMAGE_PATH.
--info-file filenameOCTAVE_INFO_FILE found in the environment, but not any commands
in the system or user startup files that use the info_file
function.
--info-program programOCTAVE_INFO_PROGRAM found in the environment, but not any
commands in the system or user startup files that use the
info_program function.
--interactive-i--line-editing--no-history-H--no-init-file--no-init-path--no-line-editing--no-site-file--norc-f--no-init-file
and --no-site-file.
--path path-p pathOCTAVE_PATH found in the environment, but not any commands in the
system or user startup files that set the internal load path through one
of the path functions.
--persist--eval or reading from a file
named on the command line.
--silent--quiet-q--traditional--braindead PS1 = ">> "
PS2 = ""
beep_on_error = true
confirm_recursive_rmdir = false
crash_dumps_octave_core = false
default_save_options = "-mat-binary"
fixed_point_format = true
history_timestamp_format_string
= "%%-- %D %I:%M %p --%%"
page_screen_output = false
print_empty_dimensions = false
and disable the following warnings
Octave:fopen-file-in-path
Octave:function-name-clash
Octave:load-file-in-path
--verbose-V--version-v--persist is also specified.
Octave also includes several functions which return information about the command line, including the number of arguments and all of the options.
Return the command line arguments passed to Octave. For example, if you invoked Octave using the command
octave --no-line-editing --silent
argvwould return a cell array of strings with the elements--no-line-editingand--silent.If you write an executable Octave script,
argvwill return the list of arguments passed to the script. See Executable Octave Programs, for an example of how to create an executable Octave script.
Return the last component of the value returned by
program_invocation_name.See also: program_invocation_name.
Return the name that was typed at the shell prompt to run Octave.
If executing a script from the command line (e.g.,
octave foo.m) or using an executable Octave script, the program name is set to the name of the script. See Executable Octave Programs, for an example of how to create an executable Octave script.See also: program_name.
Here is an example of using these functions to reproduce the command line which invoked Octave.
printf ("%s", program_name ());
arg_list = argv ();
for i = 1:nargin
printf (" %s", arg_list{i});
endfor
printf ("\n");
See Indexing Cell Arrays, for an explanation of how to retrieve objects
from cell arrays, and Defining Functions, for information about the
variable nargin.