You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Work around Maximus5/ConEmu#1068 by filtering out the ConEmuANSI and ConEmuHooks environment variables.
winpty.exe already filters out TERM, but it does so in the Cygwin/MSYS adapter. Filtering the ConEmu flags probably needs to happen in winpty.dll so it applies automatically to all programs using winpty.
I had preferred to keep environment filtering restricted to winpty.exe, because it keeps the winpty.dll API simpler. There is a winpty_spawn_config_new function that accepts an environment block, which is passed as-is to the child process. The history of winpty clients, though, is that even if TERM isn't set (and why would it be on Windows?), programmers embedding winpty frequently go out of their way to set TERM to xterm.
The appropriate default, therefore, is to clear TERM as well, in winpty.dll.
The big question is whether there should be some way to disable or restrict the filtering. I don't think anyone needs it, so maybe it could be omitted. (One random thought I had: if I add a winpty_spawn_config_set_env(name, val) API that overrides filtering, then some embedder will probably use it not to avoid filtering, but because they don't like setting up an envblock in memory.)
I might leave the winpty.exeTERM filtering in place for now, just in case someone upgrades winpty.exe without upgrading winpty.dll.
The text was updated successfully, but these errors were encountered:
rprichard
changed the title
Filter out ConEmuANSI and ConEmuHooks environment variable
Filter out ConEmuANSI and ConEmuHooks environment variables
Mar 23, 2017
Work around Maximus5/ConEmu#1068 by filtering out the
ConEmuANSI
andConEmuHooks
environment variables.winpty.exe
already filters outTERM
, but it does so in the Cygwin/MSYS adapter. Filtering the ConEmu flags probably needs to happen inwinpty.dll
so it applies automatically to all programs using winpty.I had preferred to keep environment filtering restricted to
winpty.exe
, because it keeps thewinpty.dll
API simpler. There is awinpty_spawn_config_new
function that accepts an environment block, which is passed as-is to the child process. The history of winpty clients, though, is that even ifTERM
isn't set (and why would it be on Windows?), programmers embedding winpty frequently go out of their way to setTERM
toxterm
.The appropriate default, therefore, is to clear
TERM
as well, inwinpty.dll
.The big question is whether there should be some way to disable or restrict the filtering. I don't think anyone needs it, so maybe it could be omitted. (One random thought I had: if I add a
winpty_spawn_config_set_env(name, val)
API that overrides filtering, then some embedder will probably use it not to avoid filtering, but because they don't like setting up an envblock in memory.)I might leave the
winpty.exe
TERM
filtering in place for now, just in case someone upgradeswinpty.exe
without upgradingwinpty.dll
.The text was updated successfully, but these errors were encountered: