From f23971660e0924917169b3c090b4238c6b0dcd70 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 17 Jan 2025 11:27:12 +0100 Subject: [PATCH] simplify helpconfig Co-authored-by: ghost43 --- electrum/commands.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/electrum/commands.py b/electrum/commands.py index 3f4495c96..c4f3c75ec 100644 --- a/electrum/commands.py +++ b/electrum/commands.py @@ -364,10 +364,17 @@ class Commands: return self.config.list_config_vars() @command('') - async def helpconfig(self, key, more=False): + async def helpconfig(self, key): """Returns help about a configuration variable. """ cv = self.config.cv.from_key(key) - return cv.get_long_desc() if more else cv.get_short_desc() + short = cv.get_short_desc() + long = cv.get_long_desc() + if short and long: + return short + "\n---\n\n" + long + elif short or long: + return short or long + else: + return f"No description available for '{key}'" @command('') async def make_seed(self, nbits=None, language=None, seed_type=None): @@ -1513,7 +1520,6 @@ command_options = { 'from_ccy': (None, "Currency to convert from"), 'to_ccy': (None, "Currency to convert to"), 'public': (None, 'Channel will be announced'), - 'more': (None, 'Return detailed description'), }