mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 08:26:56 +00:00
Add a --hold command line option to stay open after the child process exits
Fixes #667
This commit is contained in:
parent
d16215ab6e
commit
82f6fbff77
3 changed files with 20 additions and 0 deletions
|
|
@ -26,6 +26,13 @@ def runpy(args):
|
|||
exec(args[1])
|
||||
|
||||
|
||||
def hold(args):
|
||||
import subprocess
|
||||
ret = subprocess.Popen(args[1:]).wait()
|
||||
sys.stdin.read()
|
||||
raise SystemExit(ret)
|
||||
|
||||
|
||||
def launch(args):
|
||||
import runpy
|
||||
sys.argv = args[1:]
|
||||
|
|
@ -61,6 +68,7 @@ entry_points = {
|
|||
'+': namespaced,
|
||||
}
|
||||
namespaced_entry_points = {k: v for k, v in entry_points.items() if k[0] not in '+@'}
|
||||
namespaced_entry_points['hold'] = hold
|
||||
|
||||
|
||||
def setup_openssl_environment():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue