diff --git a/tra-cli.py b/tra-cli.py index 6c132e2..0510db8 100644 --- a/tra-cli.py +++ b/tra-cli.py @@ -12,12 +12,15 @@ subparsers = parser.add_subparsers(title = "command", metavar = "C", help = "//c parser_start = subparsers.add_parser("start", help = "//starthelp//") parser_start.add_argument("target(s)", metavar = "T", nargs = "*", choices = task_map.keys()) +parser_start.set_defaults(which = "start") parser_stop = subparsers.add_parser("stop", help = "//stophelp//") -parser_start.add_argument("target(s)", metavar = "T", nargs = "*", choices = task_map.keys()) +parser_stop.add_argument("target(s)", metavar = "T", nargs = "*", choices = task_map.keys()) +parser_stop.set_defaults(which = "stop") parser_status = subparsers.add_parser("status", help = "//stophelp//") -parser_start.add_argument("target(s)", metavar = "T", nargs = "*", choices = status_map.keys()) +parser_status.add_argument("target(s)", metavar = "T", nargs = "*", choices = status_map.keys()) +parser_status.set_defaults(which = "status") -args = parser.parse_args() -print(args) \ No newline at end of file +options = parser.parse_args() +print(options) \ No newline at end of file