Allow using "all" as "*" for enabled_layouts

This commit is contained in:
Kovid Goyal 2018-09-08 08:22:37 +05:30
parent 791f70e5a2
commit 9329b2c202
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -462,7 +462,7 @@ def to_layout_names(raw):
parts = [x.strip().lower() for x in raw.split(',')] parts = [x.strip().lower() for x in raw.split(',')]
ans = [] ans = []
for p in parts: for p in parts:
if p == '*': if p in ('*', 'all'):
ans.extend(sorted(all_layouts)) ans.extend(sorted(all_layouts))
continue continue
name = p.partition(':')[0] name = p.partition(':')[0]
@ -474,7 +474,7 @@ def to_layout_names(raw):
o('enabled_layouts', '*', option_type=to_layout_names, long_text=_(''' o('enabled_layouts', '*', option_type=to_layout_names, long_text=_('''
The enabled window layouts. A comma separated list of layout names. The special The enabled window layouts. A comma separated list of layout names. The special
value :code:`*` means all layouts. The first listed layout will be used as the value :code:`all` means all layouts. The first listed layout will be used as the
startup layout. For a list of available layouts, see the :ref:`layouts`. startup layout. For a list of available layouts, see the :ref:`layouts`.
''')) '''))