Print usage when no args provided to +runpy
This commit is contained in:
parent
d916ecc4f3
commit
a49f6799de
1 changed files with 2 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ def remote_control(args: List[str]) -> None:
|
|||
|
||||
|
||||
def runpy(args: List[str]) -> None:
|
||||
if len(args) < 2:
|
||||
raise SystemExit('Usage: kitty +runpy "some python code"')
|
||||
sys.argv = ['kitty'] + args[2:]
|
||||
exec(args[1])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue