comparison src/input.cc @ 3332:7c03933635c6

[project @ 1999-11-02 06:57:12 by jwe]
author jwe
date Tue, 02 Nov 1999 06:57:16 +0000
parents 4964d5391acc
children 15cddaacbc2d
comparison
equal deleted inserted replaced
3331:13cdcb7e5066 3332:7c03933635c6
645 645
646 return retval; 646 return retval;
647 } 647 }
648 648
649 DEFUN_TEXT(echo, args, , 649 DEFUN_TEXT(echo, args, ,
650 "echo [options]\n\ 650 "-*- texinfo -*-\n\
651 \n\ 651 @deffn {Command} echo options\n\
652 echo [on|off] -- enable or disable echoing of commands as\n\ 652 Control whether commands are displayed as they are executed. Valid\n\
653 they are executed in script files\n\ 653 options are:\n\
654 \n\ 654 \n\
655 echo [on all|off all] -- enable or disable echoing of commands as they\n\ 655 @table @code\n\
656 are executed in script files and functions\n\ 656 @item on\n\
657 \n\ 657 Enable echoing of commands as they are executed in script files.\n\
658 Without any arguments, toggle the current echo state.") 658 \n\
659 @item off\n\
660 Disable echoing of commands as they are executed in script files.\n\
661 \n\
662 @item on all\n\
663 Enable echoing of commands as they are executed in script files and\n\
664 functions.\n\
665 \n\
666 @item off all\n\
667 Disable echoing of commands as they are executed in script files and\n\
668 functions.\n\
669 @end table\n\
670 \n\
671 @noindent\n\
672 If invoked without any arguments, @code{echo} toggles the current echo\n\
673 state.\n\
674 @end deffn\n\
675 ")
659 { 676 {
660 octave_value_list retval; 677 octave_value_list retval;
661 678
662 int argc = args.length () + 1; 679 int argc = args.length () + 1;
663 680
720 737
721 return retval; 738 return retval;
722 } 739 }
723 740
724 DEFUN (completion_matches, args, nargout, 741 DEFUN (completion_matches, args, nargout,
725 "completion_matches (HINT): generate possible completions given HINT\n\ 742 "-*- texinfo -*-\n\
743 @deftypefn {Built-in Function} {} completion_matches (@var{hint})\n\
744 Generate possible completions given @var{hint}.\n\
726 \n\ 745 \n\
727 This function is provided for the benefit of programs like Emacs which\n\ 746 This function is provided for the benefit of programs like Emacs which\n\
728 might be controlling Octave and handling user input. The current command\n\ 747 might be controlling Octave and handling user input. The current\n\
729 number is not incremented when this function is called. This is a feature,\n\ 748 command number is not incremented when this function is called. This is\n\
730 not a bug.") 749 a feature, not a bug.\n\
750 @end deftypefn\n\
751 ")
731 { 752 {
732 octave_value retval; 753 octave_value retval;
733 754
734 int nargin = args.length (); 755 int nargin = args.length ();
735 756
882 903
883 void 904 void
884 symbols_of_input (void) 905 symbols_of_input (void)
885 { 906 {
886 DEFVAR (PS1, "\\s:\\#> ", ps1, 907 DEFVAR (PS1, "\\s:\\#> ", ps1,
887 "primary prompt string"); 908 "-*- texinfo -*-\n\
909 @defvr {Built-in Variable} PS1\n\
910 The primary prompt string. When executing interactively, Octave\n\
911 displays the primary prompt @code{PS1} when it is ready to read a\n\
912 command.\n\
913 \n\
914 The default value of @code{PS1} is @code{\"\\s:\\#> \"}. To change it, use a\n\
915 command like\n\
916 \n\
917 @example\n\
918 octave:13> PS1 = \"\\\\u@@\\\\H> \"\n\
919 @end example\n\
920 \n\
921 @noindent\n\
922 which will result in the prompt @samp{boris@@kremvax> } for the user\n\
923 @samp{boris} logged in on the host @samp{kremvax.kgb.su}. Note that two\n\
924 backslashes are required to enter a backslash into a string.\n\
925 @xref{Strings}.\n\
926 @end defvr\n\
927 ");
888 928
889 DEFVAR (PS2, "> ", ps2, 929 DEFVAR (PS2, "> ", ps2,
890 "secondary prompt string"); 930 "-*- texinfo -*-\n\
931 @defvr {Built-in Variable} PS2\n\
932 The secondary prompt string, which is printed when Octave is\n\
933 expecting additional input to complete a command. For example, when\n\
934 defining a function over several lines, Octave will print the value of\n\
935 @code{PS1} at the beginning of each line after the first. The default\n\
936 value of @code{PS2} is @code{\"> \"}.\n\
937 @end defvr\n\
938 ");
891 939
892 DEFVAR (PS4, "+ ", ps4, 940 DEFVAR (PS4, "+ ", ps4,
893 "string printed before echoed input (enabled by --echo-input)"); 941 "-*- texinfo -*-\n\
942 @defvr {Built-in Variable} PS4\n\
943 If Octave is invoked with the @code{--echo-input} option, the value of\n\
944 @code{PS4} is printed before each line of input that is echoed. The\n\
945 default value of @code{PS4} is @code{"+ "}. @xref{Invoking Octave}, for\n\
946 a description of @code{--echo-input}.\n\
947 @end defvr\n\
948 ");
894 949
895 DEFVAR (completion_append_char, " ", completion_append_char, 950 DEFVAR (completion_append_char, " ", completion_append_char,
896 "the string to append after successful command-line completion attempts"); 951 "-*- texinfo -*-\n\
952 @defvr {Built-in Variable} completion_append_char\n\
953 The value of @code{completion_append_char} is used as the character to\n\
954 append to successful command-line completion attempts. The default\n\
955 value is @code{\" \"} (a single space).\n\
956 @end defvr\n\
957 ");
897 958
898 DEFVAR (echo_executing_commands, static_cast<double> (ECHO_OFF), 959 DEFVAR (echo_executing_commands, static_cast<double> (ECHO_OFF),
899 echo_executing_commands, 960 echo_executing_commands,
900 "echo commands as they are executed"); 961 "-*- texinfo -*-\n\
962 @defvr {Built-in Variable} echo_executing_commands\n\
963 This variable may also be used to control the echo state. It may be\n\
964 the sum of the following values:\n\
965 \n\
966 @table @asis\n\
967 @item 1\n\
968 Echo commands read from script files.\n\
969 \n\
970 @item 2\n\
971 Echo commands from functions.\n\
972 \n\
973 @item 4\n\
974 Echo commands read from command line.\n\
975 @end table\n\
976 \n\
977 More than one state can be active at once. For example, a value of 3 is\n\
978 equivalent to the command @kbd{echo on all}.\n\
979 \n\
980 The value of @code{echo_executing_commands} is set by the @kbd{echo}\n\
981 command and the command line option @code{--echo-input}.\n\
982 @end defvr\n\
983 ");
901 } 984 }
902 985
903 /* 986 /*
904 ;;; Local Variables: *** 987 ;;; Local Variables: ***
905 ;;; mode: C++ *** 988 ;;; mode: C++ ***