diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-16 06:41:36 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-16 06:41:36 -0700 |
commit | 91fb2910f7cae2ebb36de0b871bc3b2e3f7a74eb (patch) | |
tree | 24330a6c9677da48078aeefc67edb7dccafd22c2 /txr.c | |
parent | 60301ab68ec6a6b7ecb72f83d411c651e029a587 (diff) | |
download | txr-91fb2910f7cae2ebb36de0b871bc3b2e3f7a74eb.tar.gz txr-91fb2910f7cae2ebb36de0b871bc3b2e3f7a74eb.tar.bz2 txr-91fb2910f7cae2ebb36de0b871bc3b2e3f7a74eb.zip |
listener: new --noprofile option.
* parser.c (repl): Set the rcfile variable to nil if
opt_noprofile is true, to suppress reading it.
* txr.c (op_noprofile): New global variable.
(help): Add help text.
(txr_main): Recognize noprofile option and set variable.
* txr.h (opt_noprofile): Declared.
* txr.1: Documented.
Diffstat (limited to 'txr.c')
-rw-r--r-- | txr.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -66,6 +66,7 @@ wchar_t *progname; static const char *progname_u8; static val prog_path = nil, sysroot_path = nil; int opt_noninteractive; +int opt_noprofile; int opt_compat; int opt_dbg_expansion; val stdlib_path; @@ -156,6 +157,7 @@ static void help(void) " the following argument arg, and allows one or more\n" " copies of it to be to be embedded in the\n" " encoded arguments. See manual.\n" +"--noprofile Do not read .txr_profile when entering listener.\n" #if HAVE_FORK_STUFF "--reexec Re-execute TXR with remaining arguments.\n" #endif @@ -799,6 +801,9 @@ int txr_main(int argc, char **argv) } else if (equal(opt, lit("free-all"))) { atexit(free_all); continue; + } else if (equal(opt, lit("noprofile"))) { + opt_noprofile = 1; + continue; } else { drop_privilege(); format(std_error, lit("~a: unrecognized long option: --~a\n"), |