-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvstarstack
More file actions
executable file
·24 lines (20 loc) · 852 Bytes
/
vstarstack
File metadata and controls
executable file
·24 lines (20 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python3
import sys
import vstarstack.tool.process
import vstarstack.tool.cfg
import vstarstack.tool.usage
program_project = vstarstack.tool.cfg.get_project()
if vstarstack.tool.cfg.get_param("autocomplete", bool, False):
#with open("complete", "w") as f:
# print(sys.argv, file=f)
program_argv = [item for item in sys.argv[2:] if item[:2] != "--"]
variants = vstarstack.tool.usage.autocompletion(vstarstack.tool.process.commands,
program_argv)
for variant in variants:
print(variant)
else:
program_argv = [item for item in sys.argv[1:] if item[:2] != "--"]
vstarstack.tool.usage.run(program_project,
program_argv,
"",
vstarstack.tool.process.commands)