summaryrefslogtreecommitdiff
path: root/src/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/app.c')
-rw-r--r--src/app.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/app.c b/src/app.c
index 8a02ec3f..2614c454 100644
--- a/src/app.c
+++ b/src/app.c
@@ -449,7 +449,7 @@ static void communicateWithRunningInstance_App_(iApp *d, iProcessId instance,
449 else if (equal_CommandLineConstIterator(&i, "close-tab")) { 449 else if (equal_CommandLineConstIterator(&i, "close-tab")) {
450 appendCStr_String(cmds, "tabs.close\n"); 450 appendCStr_String(cmds, "tabs.close\n");
451 } 451 }
452 else if (equal_CommandLineConstIterator(&i, "list-tab-urls;L")) { 452 else if (equal_CommandLineConstIterator(&i, listTabUrls_CommandLineOption)) {
453 appendFormat_String(cmds, "ipc.list.urls pid:%d\n", pid); 453 appendFormat_String(cmds, "ipc.list.urls pid:%d\n", pid);
454 } 454 }
455 } 455 }
@@ -481,7 +481,7 @@ static void init_App_(iApp *d, int argc, char **argv) {
481 defineValues_CommandLine(&d->args, "echo;E", 0); 481 defineValues_CommandLine(&d->args, "echo;E", 0);
482 defineValues_CommandLine(&d->args, "go-home", 0); 482 defineValues_CommandLine(&d->args, "go-home", 0);
483 defineValues_CommandLine(&d->args, "help", 0); 483 defineValues_CommandLine(&d->args, "help", 0);
484 defineValues_CommandLine(&d->args, "list-tab-urls;L", 0); 484 defineValues_CommandLine(&d->args, listTabUrls_CommandLineOption, 0);
485 defineValuesN_CommandLine(&d->args, "new-tab", 0, 1); 485 defineValuesN_CommandLine(&d->args, "new-tab", 0, 1);
486 defineValues_CommandLine(&d->args, "sw", 0); 486 defineValues_CommandLine(&d->args, "sw", 0);
487 defineValues_CommandLine(&d->args, "version;V", 0); 487 defineValues_CommandLine(&d->args, "version;V", 0);
@@ -549,6 +549,10 @@ static void init_App_(iApp *d, int argc, char **argv) {
549 communicateWithRunningInstance_App_(d, instance, openCmds); 549 communicateWithRunningInstance_App_(d, instance, openCmds);
550 terminate_App_(0); 550 terminate_App_(0);
551 } 551 }
552 /* Some options are intended only for controlling other instances. */
553 if (contains_CommandLine(&d->args, listTabUrls_CommandLineOption)) {
554 terminate_App_(0);
555 }
552 listen_Ipc(); /* We'll respond to commands from other instances. */ 556 listen_Ipc(); /* We'll respond to commands from other instances. */
553 } 557 }
554 printf("Lagrange: A Beautiful Gemini Client\n"); 558 printf("Lagrange: A Beautiful Gemini Client\n");