Fix #6048
This commit is contained in:
parent
1f84e2d4e5
commit
de188faf55
@ -579,6 +579,8 @@ def launch(
|
||||
else:
|
||||
if opts.hold:
|
||||
cmd = kw['cmd'] or [shell_path]
|
||||
if not os.path.isabs(cmd[0]):
|
||||
cmd[0] = which(cmd[0]) or cmd[0]
|
||||
kw['cmd'] = [kitten_exe(), '__hold_till_enter__'] + cmd
|
||||
if force_target_tab:
|
||||
tab = target_tab
|
||||
|
||||
@ -15,7 +15,7 @@ from .options.types import Options
|
||||
from .options.utils import resize_window, to_layout_names, window_size
|
||||
from .os_window_size import WindowSize, WindowSizeData, WindowSizes
|
||||
from .typing import SpecialWindowInstance
|
||||
from .utils import expandvars, log_error, resolve_custom_file, resolved_shell
|
||||
from .utils import expandvars, log_error, resolve_custom_file, resolved_shell, which
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .launch import LaunchSpec
|
||||
@ -234,6 +234,7 @@ def create_sessions(
|
||||
if special_window is None:
|
||||
cmd = args.args if args and args.args else resolved_shell(opts)
|
||||
if args and args.hold:
|
||||
cmd[0] = which(cmd[0]) or cmd[0]
|
||||
cmd = [kitten_exe(), '__hold_till_enter__'] + cmd
|
||||
from kitty.tabs import SpecialWindow
|
||||
cwd: Optional[str] = args.directory if respect_cwd and args else None
|
||||
|
||||
@ -441,6 +441,7 @@ class Tab: # {{{
|
||||
cmd[:0] = shlex.split(line)
|
||||
else:
|
||||
cmd[:0] = [resolved_shell(get_options())[0]]
|
||||
cmd[0] = which(cmd[0]) or cmd[0]
|
||||
cmd[:0] = [kitten_exe(), '__hold_till_enter__']
|
||||
fenv: Dict[str, str] = {}
|
||||
if env:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user