diff --git a/python/grass/app/cli.py b/python/grass/app/cli.py index 0cf05afbb47..b50513c6314 100644 --- a/python/grass/app/cli.py +++ b/python/grass/app/cli.py @@ -31,6 +31,11 @@ from grass.exceptions import ScriptError from grass.tools import Tools +COMMAND_MAP = { + "list": "g.list", + "slope": "r.slope.aspect", +} + # Special flags supported besides help and --json which does not need special handling: SPECIAL_FLAGS = [ "--interface-description", @@ -43,7 +48,8 @@ def subcommand_run_tool(args, tool_args: list, print_help: bool) -> int: - command = [args.tool, *tool_args] + resolved_tool = COMMAND_MAP.get(args.tool, args.tool) + command = [resolved_tool, *tool_args] with ExitStack() as stack: if args.project: project_path = Path(args.project)