-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheasycon-cli
36 lines (29 loc) · 913 Bytes
/
easycon-cli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env python3
from prompt_toolkit import prompt
from prompt_toolkit.completion import WordCompleter
import sys,os
options = WordCompleter([
'--config',
'--mkconfig',
'--describe',
'--login',
'--loginw',
'--dynamic',
'--forward',
'--jump',
'--dirpath',
'--uploadfile',
'--put',
'--putdir',
'--downloadfile',
'--get',
'--quit'
])
# get interpreter
python = sys.executable
while True:
cmd = prompt('>:', completer=options)
if '--quit' in cmd:
exit()
else:
os.system("{}".format(cmd))