Mercurial > hg > octave-lojdl
comparison src/octave.cc @ 9132:eb1747dbd360
Update help strings for command line options
Add documentation for --no-init-path option
Add documentation for environment variables OCTAVE_SITE_INITFILE, OCTAVE_VERSION_INITFILE
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Fri, 17 Apr 2009 14:53:17 -0700 |
parents | da58ec8f62e8 |
children | ee7cf4d963f3 |
comparison
equal
deleted
inserted
replaced
9131:6340043000c0 | 9132:eb1747dbd360 |
---|---|
105 // TRUE means we read the site-wide octaverc files. | 105 // TRUE means we read the site-wide octaverc files. |
106 // (--norc; --no-site-file; -f) | 106 // (--norc; --no-site-file; -f) |
107 static bool read_site_files = true; | 107 static bool read_site_files = true; |
108 | 108 |
109 // TRUE means we set the initial path to configured defaults. | 109 // TRUE means we set the initial path to configured defaults. |
110 // (--no-initial-path) | 110 // (--no-init-path) |
111 static bool set_initial_path = true; | 111 static bool set_initial_path = true; |
112 | 112 |
113 // TRUE means we don't print the usual startup message. | 113 // TRUE means we don't print the usual startup message. |
114 // (--quiet; --silent; -q) | 114 // (--quiet; --silent; -q) |
115 static bool inhibit_startup_message = false; | 115 static bool inhibit_startup_message = false; |
150 #define INFO_FILE_OPTION 5 | 150 #define INFO_FILE_OPTION 5 |
151 #define INFO_PROG_OPTION 6 | 151 #define INFO_PROG_OPTION 6 |
152 #define NO_INIT_FILE_OPTION 7 | 152 #define NO_INIT_FILE_OPTION 7 |
153 #define NO_LINE_EDITING_OPTION 8 | 153 #define NO_LINE_EDITING_OPTION 8 |
154 #define NO_SITE_FILE_OPTION 9 | 154 #define NO_SITE_FILE_OPTION 9 |
155 #define NO_INITIAL_PATH_OPTION 10 | 155 #define NO_INIT_PATH_OPTION 10 |
156 #define PERSIST_OPTION 11 | 156 #define PERSIST_OPTION 11 |
157 #define TRADITIONAL_OPTION 12 | 157 #define TRADITIONAL_OPTION 12 |
158 #define LINE_EDITING_OPTION 13 | 158 #define LINE_EDITING_OPTION 13 |
159 long_options long_opts[] = | 159 long_options long_opts[] = |
160 { | 160 { |
172 { "line-editing", prog_args::no_arg, 0, LINE_EDITING_OPTION }, | 172 { "line-editing", prog_args::no_arg, 0, LINE_EDITING_OPTION }, |
173 { "no-history", prog_args::no_arg, 0, 'H' }, | 173 { "no-history", prog_args::no_arg, 0, 'H' }, |
174 { "no-init-file", prog_args::no_arg, 0, NO_INIT_FILE_OPTION }, | 174 { "no-init-file", prog_args::no_arg, 0, NO_INIT_FILE_OPTION }, |
175 { "no-line-editing", prog_args::no_arg, 0, NO_LINE_EDITING_OPTION }, | 175 { "no-line-editing", prog_args::no_arg, 0, NO_LINE_EDITING_OPTION }, |
176 { "no-site-file", prog_args::no_arg, 0, NO_SITE_FILE_OPTION }, | 176 { "no-site-file", prog_args::no_arg, 0, NO_SITE_FILE_OPTION }, |
177 { "no-initial-path", prog_args::no_arg, 0, NO_INITIAL_PATH_OPTION }, | 177 { "no-init-path", prog_args::no_arg, 0, NO_INIT_PATH_OPTION }, |
178 { "norc", prog_args::no_arg, 0, 'f' }, | 178 { "norc", prog_args::no_arg, 0, 'f' }, |
179 { "path", prog_args::required_arg, 0, 'p' }, | 179 { "path", prog_args::required_arg, 0, 'p' }, |
180 { "persist", prog_args::no_arg, 0, PERSIST_OPTION }, | 180 { "persist", prog_args::no_arg, 0, PERSIST_OPTION }, |
181 { "quiet", prog_args::no_arg, 0, 'q' }, | 181 { "quiet", prog_args::no_arg, 0, 'q' }, |
182 { "silent", prog_args::no_arg, 0, 'q' }, | 182 { "silent", prog_args::no_arg, 0, 'q' }, |
507 --doc-cache-file FILE Use doc cache file FILE.\n\ | 507 --doc-cache-file FILE Use doc cache file FILE.\n\ |
508 --echo-commands, -x Echo commands as they are executed.\n\ | 508 --echo-commands, -x Echo commands as they are executed.\n\ |
509 --eval CODE Evaluate CODE. Exit when done unless --persist.\n\ | 509 --eval CODE Evaluate CODE. Exit when done unless --persist.\n\ |
510 --exec-path PATH Set path for executing subprograms.\n\ | 510 --exec-path PATH Set path for executing subprograms.\n\ |
511 --help, -h, -? Print short help message and exit.\n\ | 511 --help, -h, -? Print short help message and exit.\n\ |
512 --image-path PATH Set initial IMAGE_PATH to PATH.\n\ | 512 --image-path PATH Add PATH to head of image search path.\n\ |
513 --info-file FILE Use top-level info file FILE.\n\ | 513 --info-file FILE Use top-level info file FILE.\n\ |
514 --info-program PROGRAM Use PROGRAM for reading info files.\n\ | 514 --info-program PROGRAM Use PROGRAM for reading info files.\n\ |
515 --interactive, -i Force interactive behavior.\n\ | 515 --interactive, -i Force interactive behavior.\n\ |
516 --line-editing Force readline use for command-line editing.\n\ | 516 --line-editing Force readline use for command-line editing.\n\ |
517 --no-history, -H Don't save commands to the history list\n\ | 517 --no-history, -H Don't save commands to the history list\n\ |
518 --no-init-file Don't read the ~/.octaverc or .octaverc files.\n\ | 518 --no-init-file Don't read the ~/.octaverc or .octaverc files.\n\ |
519 --no-init-path Don't initialize function search path.\n\ | |
519 --no-line-editing Don't use readline for command-line editing.\n\ | 520 --no-line-editing Don't use readline for command-line editing.\n\ |
520 --no-site-file Don't read the site-wide octaverc file.\n\ | 521 --no-site-file Don't read the site-wide octaverc file.\n\ |
521 --norc, -f Don't read any initialization files.\n\ | 522 --norc, -f Don't read any initialization files.\n\ |
522 --path PATH, -p PATH Set initial function search path to PATH.\n\ | 523 --path PATH, -p PATH Add PATH to head of function search path.\n\ |
523 --persist Go interactive after --eval or reading from FILE.\n\ | 524 --persist Go interactive after --eval or reading from FILE.\n\ |
524 --silent, -q Don't print message at startup.\n\ | 525 --silent, -q Don't print message at startup.\n\ |
525 --traditional Set compatibility variables.\n\ | 526 --traditional Set variables for closer MATLAB compatibility.\n\ |
526 --verbose, -V Enable verbose output in some cases.\n\ | 527 --verbose, -V Enable verbose output in some cases.\n\ |
527 --version, -v Print version number and exit.\n\ | 528 --version, -v Print version number and exit.\n\ |
528 \n\ | 529 \n\ |
529 FILE Execute commands from FILE. Exit when done\n\ | 530 FILE Execute commands from FILE. Exit when done\n\ |
530 unless --persist is also specified.\n\ | 531 unless --persist is also specified.\n\ |
737 case INFO_PROG_OPTION: | 738 case INFO_PROG_OPTION: |
738 if (args.optarg ()) | 739 if (args.optarg ()) |
739 bind_internal_variable ("info_program", args.optarg ()); | 740 bind_internal_variable ("info_program", args.optarg ()); |
740 break; | 741 break; |
741 | 742 |
742 case LINE_EDITING_OPTION: | 743 case LINE_EDITING_OPTION: |
743 forced_line_editing = true; | 744 forced_line_editing = true; |
744 break; | 745 break; |
745 | 746 |
746 case NO_INIT_FILE_OPTION: | 747 case NO_INIT_FILE_OPTION: |
747 read_init_files = false; | 748 read_init_files = false; |
748 break; | 749 break; |
749 | 750 |
753 | 754 |
754 case NO_SITE_FILE_OPTION: | 755 case NO_SITE_FILE_OPTION: |
755 read_site_files = 0; | 756 read_site_files = 0; |
756 break; | 757 break; |
757 | 758 |
758 case NO_INITIAL_PATH_OPTION: | 759 case NO_INIT_PATH_OPTION: |
759 set_initial_path = false; | 760 set_initial_path = false; |
760 break; | 761 break; |
761 | 762 |
762 case TRADITIONAL_OPTION: | 763 case TRADITIONAL_OPTION: |
763 traditional = true; | 764 traditional = true; |