Skip to content
Open
Changes from all 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
8 changes: 7 additions & 1 deletion python/grass/app/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
Expand Down
Loading