mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-24 17:27:39 +02:00
When running a shell for `--hold set the env variable KITTY_HOLD=1` to allow users to customize what happens
For instance the user could have [ "$KITTY_HOLD" = "1" ] && exec kitten __hold_till_enter__ in their shell rc files to get back the previous Press enter or esc to quit behavior.
This commit is contained in:
@@ -1185,7 +1185,7 @@ def cmdline_for_hold(cmd: Sequence[str] = (), opts: Optional['Options'] = None)
|
||||
ksi = ' '.join(opts.shell_integration)
|
||||
import shlex
|
||||
shell = shlex.join(resolved_shell(opts))
|
||||
return [kitten_exe(), 'run-shell', f'--shell={shell}', f'--shell-integration={ksi}'] + list(cmd)
|
||||
return [kitten_exe(), 'run-shell', f'--shell={shell}', f'--shell-integration={ksi}', '--env=KITTY_HOLD=1'] + list(cmd)
|
||||
|
||||
|
||||
def safe_mtime(path: str) -> Optional[float]:
|
||||
|
||||
Reference in New Issue
Block a user