help: do not show config default when it is set

This commit is contained in:
dece 2021-05-18 16:47:52 +02:00
parent ca72c4683e
commit e2cc152f6d
2 changed files with 6 additions and 1 deletions

View file

@ -303,6 +303,7 @@ class Browser:
num_words = len(words) num_words = len(words)
if num_words == 0: if num_words == 0:
return return
command = words[0] command = words[0]
if num_words == 1: if num_words == 1:
if command in ("q", "quit"): if command in ("q", "quit"):

View file

@ -77,7 +77,11 @@ Your current configuration is:
def get_help(config): def get_help(config):
config_list = "\n".join( config_list = "\n".join(
f'* {key} = {value} (default "{DEFAULT_CONFIG[key]}")' (
f'* {key} = {value} (default {repr(DEFAULT_CONFIG[key])})'
if value != DEFAULT_CONFIG[key]
else f'* {key} = {value}'
)
for key, value in config.items() for key, value in config.items()
) )
return HELP_PAGE + config_list return HELP_PAGE + config_list