diff options
-rw-r--r-- | parser.c | 3 | ||||
-rw-r--r-- | txr.1 | 17 | ||||
-rw-r--r-- | txr.c | 2 |
3 files changed, 21 insertions, 1 deletions
@@ -55,6 +55,7 @@ #include "cadr.h" #include "struct.h" #include "parser.h" +#include "txr.h" #if HAVE_TERMIOS #include "linenoise/linenoise.h" #endif @@ -986,6 +987,8 @@ val repl(val bindings, val in_stream, val out_stream) if (histfile_u8) lino_hist_load(ls, histfile_u8); + lino_set_noninteractive(ls, opt_noninteractive); + while (!done) { val prompt = format(nil, lit("~d> "), counter, nao); val prev_counter = counter; @@ -458,7 +458,10 @@ Invoke the interactive \*(TX debugger. See the DEBUGGER section. .coIP --noninteractive This option affects behavior related to \*(TX's .code *std-input* -stream. Normally, if this stream is connected to a terminal device, it is +stream. It also has a another, unrelated effect, on the +behavior of the interactive listener; see below. + +Normally, if this stream is connected to a terminal device, it is automatically marked as having the real-time property when \*(TX starts up (see the functions .code stream-set-prop and .codn real-time-stream-p ). @@ -478,6 +481,18 @@ returned by that function has behaviors that are better suited for scanning interactive input. A more detailed explanation is given under the description of this function. +If the +.code -n +option is effect and \*(TX enters into the interactive listener, +the listener operates in +.IR "plain mode" . +The listener reads buffered lines +from the operating system without any character-based editing features +or history navigation. In plain mode, no prompts appear and no +terminal control escape sequences are generated. The only output is +the results of evaluation, related diagnostic messages, and any output +generated by the evaluated expressions themselves. + .coIP -v Verbose operation. Detailed logging is enabled. @@ -125,6 +125,8 @@ static void help(void) "-d Debugger mode.\n" "-n Noninteractive input mode for standard input stream,\n" " even if its connected to a terminal device.\n" +" Also, forces the interactive listener into\n" +" 'plain mode' without editing features.\n" "-a N Generate array variables up to N dimensions.\n" " N is a decimal integer. The default value is 1.\n" " Additional dimensions beyond N are fudged\n" |