From eb296d4fde98966854e239eb1ac0eed0c57f696f Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 22 May 2015 14:56:26 +0200 Subject: options: --loop without argument means looping forever Adding a "yes" choice makes the option parser consider this option as a multi-state flag option, and without argument "yes" is implicitly selected. "yes" is made an alias for "inf", so it will loop infinitely. As a negative side effect, the old syntax "-loop inf" does not work anymore. Since this is ambiguous, the option parser prefers interpreting the "inf" as filename. Fixes #1970. --- options/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/options/options.c b/options/options.c index 576b1ec08b..b4662605ae 100644 --- a/options/options.c +++ b/options/options.c @@ -477,7 +477,7 @@ const m_option_t mp_opts[] = { OPT_CHOICE_OR_INT("loop", loop_times, 0, 1, 10000, ({"no", 1}, - {"inf", -1}, + {"inf", -1}, {"yes", -1}, {"force", -2})), OPT_CHOICE_OR_INT("loop-file", loop_file, 0, 0, 10000, ({"no", 0}, -- cgit v1.2.3