Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the help menu whenever users move to a different menu #1968

Merged
merged 15 commits into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openbb_terminal/feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
OPEN_REPORT_AS_HTML = strtobool(os.getenv("OPENBB_OPEN_REPORT_AS_HTML", "True"))

# Enable auto print_help when exiting menus
ENABLE_EXIT_AUTO_HELP = strtobool(os.getenv("OPENBB_ENABLE_EXIT_AUTO_HELP", "False"))
ENABLE_EXIT_AUTO_HELP = strtobool(os.getenv("OPENBB_ENABLE_EXIT_AUTO_HELP", "True"))

# Remember contexts during session
REMEMBER_CONTEXTS = strtobool(os.getenv("OPENBB_REMEMBER_CONTEXTS", "True"))
Expand Down
3 changes: 2 additions & 1 deletion openbb_terminal/parent_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ def call_cls(self, _) -> None:
def call_home(self, _) -> None:
"""Process home command"""
self.save_class()
console.print("")
if self.PATH.count("/") == 1 and obbff.ENABLE_EXIT_AUTO_HELP:
self.print_help()
for _ in range(self.PATH.count("/") - 1):
self.queue.insert(0, "quit")

Expand Down