about summary refs log tree commit diff stats
path: root/src/main.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-08-02 15:28:28 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-08-02 15:55:47 +0200
commit10ca3e8c315794138ac4c413aea179ea8a0e1249 (patch)
tree22c9d710cdab0433a786fff472668f70bf419cfc /src/main.c
parent5d711639b060eb0454fee69c5f8e5ffcc27f492f (diff)
downloadprofani-tty-10ca3e8c315794138ac4c413aea179ea8a0e1249.tar.gz
Possibility to specify alternative config file
Introduce `profanity -c` to specify an alternative config file.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index e7259b7b..ae40e9f0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -61,6 +61,7 @@
 static gboolean version = FALSE;
 static char *log = "INFO";
 static char *account_name = NULL;
+static char *config_file = NULL;
 
 int
 main(int argc, char **argv)
@@ -75,6 +76,7 @@ main(int argc, char **argv)
         { "version", 'v', 0, G_OPTION_ARG_NONE, &version, "Show version information", NULL },
         { "account", 'a', 0, G_OPTION_ARG_STRING, &account_name, "Auto connect to an account on startup" },
         { "log",'l', 0, G_OPTION_ARG_STRING, &log, "Set logging levels, DEBUG, INFO (default), WARN, ERROR", "LEVEL" },
+        { "config",'c', 0, G_OPTION_ARG_STRING, &config_file, "Use an alternative configuration file", NULL },
         { NULL }
     };
 
@@ -169,7 +171,7 @@ main(int argc, char **argv)
         return 0;
     }
 
-    prof_run(log, account_name);
+    prof_run(log, account_name, config_file);
 
     return 0;
 }