Print usage when no args provided to +runpy

This commit is contained in:
Kovid Goyal 2021-08-08 09:10:47 +05:30
parent d916ecc4f3
commit a49f6799de
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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])