From fc70d700b2bb05d0209bc5234a105fef75461a10 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 7 Sep 2014 21:06:36 +0200 Subject: [PATCH] cmdutils: Force metavar if choices are given. --- qutebrowser/commands/cmdutils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qutebrowser/commands/cmdutils.py b/qutebrowser/commands/cmdutils.py index 1188cf1f2..ca15f59e8 100644 --- a/qutebrowser/commands/cmdutils.py +++ b/qutebrowser/commands/cmdutils.py @@ -291,6 +291,7 @@ class register: # pylint: disable=invalid-name pass elif utils.is_enum(typ): kwargs['choices'] = [e.name.replace('_', '-') for e in typ] + kwargs['metavar'] = param.name elif typ is bool: kwargs['action'] = 'store_true' elif typ is not None: