diff --git a/cli/openbb_cli/config/menu_text.py b/cli/openbb_cli/config/menu_text.py index b9702359dbb..c2b98922c84 100644 --- a/cli/openbb_cli/config/menu_text.py +++ b/cli/openbb_cli/config/menu_text.py @@ -108,14 +108,20 @@ class MenuText: """Append raw text (without translation).""" self.menu_text += text - def add_section(self, text: str, description: str = ""): + def add_section( + self, text: str, description: str = "", leading_new_line: bool = False + ): """Append raw text (without translation).""" spacing = (self.CMD_NAME_LENGTH - len(text) + self.SECTION_SPACING) * " " left_spacing = self.SECTION_SPACING * " " if description: text = f"{left_spacing}{text}{spacing}{description}\n" - self.menu_text += "\n" + text + if leading_new_line: + self.menu_text += "\n" + text + + else: + self.menu_text += text def add_custom(self, name: str): """Append custom text (after translation).""" diff --git a/cli/openbb_cli/controllers/cli_controller.py b/cli/openbb_cli/controllers/cli_controller.py index 941c94478cf..4d6a18fb839 100644 --- a/cli/openbb_cli/controllers/cli_controller.py +++ b/cli/openbb_cli/controllers/cli_controller.py @@ -255,6 +255,7 @@ class CLIController(BaseController): mt.add_section( "data processing", description="analyze and process previously obtained data", + leading_new_line=True, ) for router, value in PLATFORM_ROUTERS.items(): if router not in DATA_PROCESSING_ROUTERS: @@ -275,6 +276,7 @@ class CLIController(BaseController): mt.add_section( "configuration", description="configure the platform and manage your account", + leading_new_line=True, ) for router, value in PLATFORM_ROUTERS.items(): if router not in NON_DATA_ROUTERS or router in ["reference", "coverage"]: @@ -295,6 +297,7 @@ class CLIController(BaseController): mt.add_section( "OBBject registry", description="access and manage your cached results", + leading_new_line=True, ) mt.add_cmd("results") diff --git a/cli/openbb_cli/controllers/settings_controller.py b/cli/openbb_cli/controllers/settings_controller.py index d293078a0ef..57e99441c35 100644 --- a/cli/openbb_cli/controllers/settings_controller.py +++ b/cli/openbb_cli/controllers/settings_controller.py @@ -57,7 +57,6 @@ class SettingsController(BaseController): mt = MenuText("settings/") mt.add_info("_info_") - mt.add_raw("\n") mt.add_setting("interactive", settings.USE_INTERACTIVE_DF) mt.add_setting("cls", settings.USE_CLEAR_AFTER_CMD) mt.add_setting("promptkit", settings.USE_PROMPT_TOOLKIT) @@ -70,7 +69,6 @@ class SettingsController(BaseController): mt.add_setting("obbject_msg", settings.SHOW_MSG_OBBJECT_REGISTRY) mt.add_raw("\n") mt.add_info("_settings_") - mt.add_raw("\n") mt.add_cmd("console_style") mt.add_cmd("flair") mt.add_cmd("timezone")