When at shell prompt use reported cwd

This commit is contained in:
Kovid Goyal 2022-03-15 21:16:49 +05:30
parent a834f221f1
commit 7d9cf0b064
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1137,6 +1137,10 @@ class Window:
@property
def cwd_of_child(self) -> Optional[str]:
if self.at_prompt and self.screen.last_reported_cwd:
cwd = path_from_osc7_url(self.screen.last_reported_cwd)
if cwd:
return cwd
return self.child.foreground_cwd or self.child.current_cwd
def modify_argv_for_launch_with_cwd(self, argv: List[str]) -> str: