if no file is given for script prompt for it

This commit is contained in:
Florent 2026-02-05 14:10:46 -04:00
parent 3bd01ae578
commit 163664b28b

View file

@ -3487,8 +3487,13 @@ async def next_cmd(mc, cmds, json_output=False):
await interactive_loop(mc, to=contact)
case "script" :
argnum = 1
await process_script(mc, cmds[1], json_output=json_output)
if len(cmds) > 1:
argnum = 1
filename = cmds[1]
else:
file_name = await prompt_for_file()
if not file_name is None:
await process_script(mc, file_name, json_output=json_output)
case _ :
contact = await get_contact_from_arg(mc, cmds[0])