mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-08 01:53:35 +02:00
On second thoughts dont use foreground process env vars for kitten @ ls
Since the purpose of the env vars is mostly to recognize windows the original env vars make more sense. Also I dislike changing behavior for no good reason.
This commit is contained in:
@@ -78,8 +78,7 @@ Detailed list of changes
|
||||
|
||||
- Render Private Use Unicode symbols using two cells if the second cell contains a non-breaking space as well as a normal space
|
||||
|
||||
- kitten @ ls: Return the environment of the foreground process instead of the initial child process (:iss:`6749`)
|
||||
|
||||
- macOS: Fix a regression in the previous release that caused kitten @ ls to not report the environment variables for the default shell (:iss:`6749`)
|
||||
|
||||
0.30.1 [2023-10-05]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -386,9 +386,9 @@ class Child:
|
||||
def environ(self) -> Dict[str, str]:
|
||||
try:
|
||||
assert self.pid is not None
|
||||
return environ_of_process(self.pid)
|
||||
return environ_of_process(self.pid) or self.final_env.copy()
|
||||
except Exception:
|
||||
return {}
|
||||
return self.final_env.copy()
|
||||
|
||||
@property
|
||||
def current_cwd(self) -> Optional[str]:
|
||||
|
||||
@@ -654,7 +654,7 @@ class Window:
|
||||
'pid': self.child.pid,
|
||||
'cwd': self.child.current_cwd or self.child.cwd,
|
||||
'cmdline': self.child.cmdline,
|
||||
'env': self.child.foreground_environ or self.child.environ or self.child.final_env,
|
||||
'env': self.child.environ or self.child.final_env,
|
||||
'foreground_processes': self.child.foreground_processes,
|
||||
'is_self': is_self,
|
||||
'at_prompt': self.at_prompt,
|
||||
|
||||
Reference in New Issue
Block a user