We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5531437 commit 3d4a535Copy full SHA for 3d4a535
unix/main.c
@@ -474,9 +474,12 @@ MP_NOINLINE int main_(int argc, char **argv) {
474
475
const int NOTHING_EXECUTED = -2;
476
int ret = NOTHING_EXECUTED;
477
+ bool inspect = false;
478
for (int a = 1; a < argc; a++) {
479
if (argv[a][0] == '-') {
- if (strcmp(argv[a], "-c") == 0) {
480
+ if (strcmp(argv[a], "-i") == 0) {
481
+ inspect = true;
482
+ } else if (strcmp(argv[a], "-c") == 0) {
483
if (a + 1 >= argc) {
484
return usage(argv);
485
}
@@ -556,7 +559,7 @@ MP_NOINLINE int main_(int argc, char **argv) {
556
559
557
560
558
561
- if (ret == NOTHING_EXECUTED) {
562
+ if (ret == NOTHING_EXECUTED || inspect) {
563
if (isatty(0)) {
564
prompt_read_history();
565
ret = do_repl();
0 commit comments