Dont clone prompt related env variables

These really shouldnt be exported but people often do
This commit is contained in:
Kovid Goyal 2022-04-15 15:18:43 +05:30
parent aab9482e31
commit b5701691c6
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -567,6 +567,10 @@ class CloneCmd:
self.args.append(v)
elif k == 'env':
self.env = parse_bash_env(v) if self.envfmt == 'bash' else parse_null_env(v)
for filtered in ('PS0', 'PS1', 'PS2', 'PS3', 'PS4', 'RPS1', 'PROMPT_COMMAND'):
# some people export these. We want the shell rc files to
# recreate them
self.env.pop(filtered, None)
elif k == 'cwd':
self.cwd = v
elif k == 'argv':