Skip to content

Commit 04614e9

Browse files
committed
@ shortcut for cli
1 parent 251ca26 commit 04614e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/meshcore_cli/meshcore_cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,15 @@ async def next_cmd(mc, cmds):
171171
case "sleep" | "s" :
172172
argnum = 1
173173
await asyncio.sleep(int(cmds[1]))
174-
case "cli" :
174+
case "cli" | "@" :
175175
argnum = 1
176176
print (await mc.send_cli(cmds[1]))
177-
177+
case _ :
178+
if cmds[0][0] == "@" :
179+
print (await mc.send_cli(cmds[0][1:]))
180+
else :
181+
printerr (f"Unknown command : {cmds[0]}")
182+
178183
printerr (f"cmd {cmds[0:argnum+1]} processed ...")
179184
return cmds[argnum+1:]
180185

0 commit comments

Comments
 (0)