Skip to content

Commit 3554911

Browse files
committed
script command
1 parent d268da5 commit 3554911

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/meshcore_cli/meshcore_cli.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def make_completion_dict(contacts):
195195
"rp" : None,
196196
"cp" : None,
197197
"cli" : None,
198+
"script" : None,
198199
"$remove_contact" : contact_list,
199200
"$msg" : contact_list,
200201
"$cmd" : contact_list,
@@ -237,11 +238,6 @@ async def interactive_loop(mc, to=None) :
237238
if res.type == EventType.NO_MORE_MSGS:
238239
break
239240

240-
completion_dict = {
241-
"to": None,
242-
"send": None,
243-
}
244-
245241
completer = NestedCompleter.from_nested_dict(make_completion_dict(mc.contacts))
246242
if os.path.isdir(MCCLI_CONFIG_DIR) :
247243
our_history = FileHistory(MCCLI_HISTORY_FILE)
@@ -322,6 +318,7 @@ def _(event):
322318
line.startswith("chan") or\
323319
line.startswith("card") or \
324320
line.startswith("lc") or \
321+
line.startswith("script") or \
325322
line == "infos" or line == "i" :
326323
args = shlex.split(line)
327324
await process_cmds(mc, args)
@@ -1022,6 +1019,10 @@ async def next_cmd(mc, cmds, json_output=False):
10221019
contact = mc.get_contact_by_name(cmds[1])
10231020
await interactive_loop(mc, to=contact)
10241021

1022+
case "script" :
1023+
argnum = 1
1024+
await process_script(mc, cmds[1], json_output=json_output)
1025+
10251026
case "cli" | "@" :
10261027
argnum = 1
10271028
res = await mc.commands.send_cli(cmds[1])

0 commit comments

Comments
 (0)