mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
@ shortcut for cli
This commit is contained in:
parent
251ca26acb
commit
04614e9c49
1 changed files with 7 additions and 2 deletions
|
|
@ -171,10 +171,15 @@ async def next_cmd(mc, cmds):
|
|||
case "sleep" | "s" :
|
||||
argnum = 1
|
||||
await asyncio.sleep(int(cmds[1]))
|
||||
case "cli" :
|
||||
case "cli" | "@" :
|
||||
argnum = 1
|
||||
print (await mc.send_cli(cmds[1]))
|
||||
|
||||
case _ :
|
||||
if cmds[0][0] == "@" :
|
||||
print (await mc.send_cli(cmds[0][1:]))
|
||||
else :
|
||||
printerr (f"Unknown command : {cmds[0]}")
|
||||
|
||||
printerr (f"cmd {cmds[0:argnum+1]} processed ...")
|
||||
return cmds[argnum+1:]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue