summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 4253eee..f23e1ea 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1024,7 +1024,10 @@ static void parse_args(struct tofi *tofi, int argc, char *argv[])
/* Second pass, parse everything else. */
optind = 1;
- opt = getopt_long(argc, argv, short_options, long_options, &option_index);
+ if (dmenu_mode)
+ opt = getopt_long(argc, argv, dmenu_short_options, long_options, &option_index);
+ else
+ opt = getopt_long(argc, argv, short_options, long_options, &option_index);
while (opt != -1) {
if (!dmenu_mode) {
if (opt == 0) {
@@ -1067,7 +1070,10 @@ static void parse_args(struct tofi *tofi, int argc, char *argv[])
}
}
}
- opt = getopt_long(argc, argv, short_options, long_options, &option_index);
+ if (dmenu_mode)
+ opt = getopt_long(argc, argv, dmenu_short_options, long_options, &option_index);
+ else
+ opt = getopt_long(argc, argv, short_options, long_options, &option_index);
}
if (optind < argc) {