Skip to content

Commit

Permalink
Merge pull request #2167 from gtalarico/windows-envname-in-prompt
Browse files Browse the repository at this point in the history
Adds environment name to PROMPT on Cmd, Cmder,ConEmu
  • Loading branch information
techalchemy authored May 15, 2018
2 parents 4b07aaa + 95459e8 commit da5a8b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pipenv/patched/pew/pew.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ def shell(env, cwd=None):
inve(env, shell, '-c', shell_check)
except CalledProcessError:
return
if shell_name in ('Cmder', 'cmd'):
os.environ['PROMPT'] = '({0}) {1}'.format(env, os.environ['PROMPT'])
if shell_name == 'bash':
fork_bash(env, cwd)
elif shell_name == 'Cmder':
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/pipenv/patched/pew/pew.py b/pipenv/patched/pew/pew.py
index 2d3889a0..07dbdf4f 100644
--- a/pipenv/patched/pew/pew.py
+++ b/pipenv/patched/pew/pew.py
@@ -215,6 +215,8 @@ def shell(env, cwd=None):
inve(env, shell, '-c', shell_check)
except CalledProcessError:
return
+ if shell_name in ('Cmder', 'cmd'):
+ os.environ['PROMPT'] = '({0}) {1}'.format(env, os.environ['PROMPT'])
if shell_name == 'bash':
fork_bash(env, cwd)
elif shell_name == 'Cmder':

0 comments on commit da5a8b3

Please sign in to comment.