Use foreground process only if shell integration reports we are not at a prompt
This commit is contained in:
parent
f925327755
commit
af8cb7c39d
1 changed files with 2 additions and 2 deletions
|
|
@ -2017,8 +2017,8 @@ def as_launch_command(self, ser_opts: SaveAsSessionOptions, cwd: str, is_overlay
|
|||
if self.creation_spec.cmd != resolved_shell(get_options()):
|
||||
cmd = self.creation_spec.cmd
|
||||
unserialize_data: dict[str, int | list[str] | str] = {'id': self.id}
|
||||
if not cmd and ser_opts.use_foreground_process:
|
||||
if not self.at_prompt and self.last_cmd_cmdline:
|
||||
if not cmd and ser_opts.use_foreground_process and not self.at_prompt:
|
||||
if self.last_cmd_cmdline:
|
||||
unserialize_data['cmd_at_shell_startup'] = self.last_cmd_cmdline
|
||||
elif self.child.pid != (pid := self.child.pid_for_cwd) and pid is not None:
|
||||
# we have a shell running some command
|
||||
|
|
|
|||
Loading…
Reference in a new issue