From b337fdfefa12261b12d0ca5a355537d1e91308e8 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Thu, 30 Nov 2017 20:26:21 +0100 Subject: [PATCH] Interpret - as STDIN config file --- src/settings.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/settings.c b/src/settings.c index c6319d9..90fc321 100644 --- a/src/settings.c +++ b/src/settings.c @@ -78,7 +78,11 @@ void load_settings(char *cmdline_config_path) xdgInitHandle(&xdg); if (cmdline_config_path != NULL) { - config_file = fopen(cmdline_config_path, "r"); + if (0 == strcmp(cmdline_config_path, "-")) { + config_file = stdin; + } else { + config_file = fopen(cmdline_config_path, "r"); + } if(!config_file) { char *msg = g_strdup_printf(