When launching child process set the PWD environment variable

This allows shells to display the symlink path to a directory instead
of the resolved path, when the specified directory is a symlink. Fixes #1595
This commit is contained in:
Kovid Goyal
2019-05-11 12:57:25 +05:30
parent af2c9a49b1
commit 4fa4a20b22
2 changed files with 5 additions and 0 deletions

View File

@@ -129,6 +129,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
It can now increment font size and reset it. It also only acts on the
active top-level window, by default (:iss:`1581`)
- When launching child processes set the :code:`PWD` environment variable
(:iss:`1595`)
0.13.3 [2019-01-19]
------------------------------

View File

@@ -168,6 +168,8 @@ class Child:
env.update(self.env)
env['TERM'] = self.opts.term
env['COLORTERM'] = 'truecolor'
if self.cwd:
env['PWD'] = self.cwd
if os.path.isdir(terminfo_dir):
env['TERMINFO'] = terminfo_dir
env = tuple('{}={}'.format(k, v) for k, v in env.items())