@@ -129,7 +129,7 @@ def process_console_output(res, target, action, run_args):
129129def build_pre_parser ():
130130 pre_parser = argparse .ArgumentParser (add_help = False )
131131 pre_parser .add_argument ("action" , nargs = "?" , help = "Top-level action (run, build, help, etc.)" )
132- pre_parser .add_argument ("target" , choices = ['run' , 'script' , 'cache' , 'repo' ], nargs = "?" , help = "Target (repo, script, cache, ...)" )
132+ pre_parser .add_argument ("target" , choices = ['run' , 'script' , 'cache' , 'repo' , 'repos' ], nargs = "?" , help = "Target (repo, script, cache, ...)" )
133133 pre_parser .add_argument ("-h" , "--help" , action = "store_true" )
134134 return pre_parser
135135
@@ -141,7 +141,7 @@ def build_parser(pre_args):
141141 # General commands
142142 for action in ['run' , 'pull' , 'test' , 'add' , 'show' , 'list' , 'find' , 'search' , 'rm' , 'cp' , 'mv' , 'help' ]:
143143 p = subparsers .add_parser (action , add_help = False )
144- p .add_argument ('target' , choices = ['repo' , 'script' , 'cache' ])
144+ p .add_argument ('target' , choices = ['repo' , 'repos' , ' script' , 'cache' ])
145145 p .add_argument ('details' , nargs = '?' , help = 'Details or identifier (optional)' )
146146 p .add_argument ('extra' , nargs = argparse .REMAINDER )
147147
@@ -215,11 +215,11 @@ def main():
215215
216216 Each target has a specific set of actions to tailor automation workflows, as shown below:
217217
218- | Target | Actions |
219- |---------|-------------------------------------------------------|
218+ | Target | Actions |
219+ |---------|----------------------------------------------------------- |
220220 | script | run, find/search, rm, mv, cp, add, test, docker-run, show |
221- | cache | find/search, rm, show |
222- | repo | pull, search, rm, list, find/search |
221+ | cache | find/search, rm, show |
222+ | repo | pull, search, rm, list, find/search |
223223
224224 Example:
225225 mlc run script detect-os
@@ -286,6 +286,12 @@ def main():
286286 print (help_text )
287287 sys .exit (0 )
288288
289+ # show repos alias list repo
290+ if args .command in ("show" ):
291+ args .command = "list"
292+ if args .target == "repos" :
293+ args .target = "repo"
294+
289295 action = get_action (args .target , default_parent )
290296
291297 if not action or not hasattr (action , args .command ):
0 commit comments