display color when running in CMDER but not regular ol' powershell

This commit is contained in:
Erin O'Connell
2018-07-03 19:43:17 -07:00
parent 1780e0b0fa
commit db3a9b672f
+3 -1
View File
@@ -34,12 +34,14 @@ __all__ = (
COLORS = __all__[:-2]
is_ipython = "get_ipython" in dir()
isCmder = True if os.environ.get('CMDER_ROOT') else False
try:
is_powershell = "powershell" in shellingham.detect_shell()[0]
except shellingham.ShellDetectionFailure:
is_powershell = False
if is_ipython or is_powershell:
if is_ipython or (is_powershell and not isCmder):
"""when ipython is fired lot of variables like _oh, etc are used.
There are so many ways to find current python interpreter is ipython.
get_ipython is easiest is most appealing for readers to understand.