From 6fa44652c5bc0c498be0ef5aaad6e294347d7804 Mon Sep 17 00:00:00 2001 From: Gavin D'souza Date: Wed, 15 Sep 2021 16:09:40 +0530 Subject: [PATCH] chore: Add fallback help link to docs Didn't use https://frappeframework.com/docs/user/en/bench since the invisible parts weren't being rendered correctly in click...Even with the latest stable click. --- frappe/commands/__init__.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/frappe/commands/__init__.py b/frappe/commands/__init__.py index 6eccdac4fb..6fb33a51b7 100644 --- a/frappe/commands/__init__.py +++ b/frappe/commands/__init__.py @@ -104,7 +104,22 @@ def get_commands(): from .utils import commands as utils_commands from .redis import commands as redis_commands - all_commands = scheduler_commands + site_commands + translate_commands + utils_commands + redis_commands - return list(set(all_commands)) + clickable_link = ( + "\x1b]8;;https://frappeframework.com/docs\afrappeframework.com\x1b]8;;\a" + ) + all_commands = ( + scheduler_commands + + site_commands + + translate_commands + + utils_commands + + redis_commands + ) + + for command in all_commands: + if not command.help: + command.help = f"Refer to {clickable_link}" + + return all_commands + commands = get_commands()