summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-16 06:41:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-16 06:41:36 -0700
commit91fb2910f7cae2ebb36de0b871bc3b2e3f7a74eb (patch)
tree24330a6c9677da48078aeefc67edb7dccafd22c2 /txr.c
parent60301ab68ec6a6b7ecb72f83d411c651e029a587 (diff)
downloadtxr-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index 90d6d84e..44a07843 100644
--- a/txr.c
+++ b/txr.c
@@ -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"),