File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ v0.3.0 (in development)
2
+ -----------------------
3
+ - Support showing Conda environment prompt prefixes
4
+
1
5
v0.2.2 (2021-07-11)
2
6
-------------------
3
7
- When inside a ` .git ` directory, treat it like a bare repository, thereby
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ it's better.
7
7
Features:
8
8
9
9
- lets you know if you have mail in ``$MAIL ``
10
- - shows chroot and `virtualenv <https://virtualenv.pypa.io >`_ prompt prefixes
10
+ - shows chroot, `virtualenv <https://virtualenv.pypa.io >`_, and `Conda
11
+ <https://conda.io> `_ environment prompt prefixes
11
12
- automatically truncates the current directory path if it gets too long
12
13
- shows the status of the current Git repository (see below)
13
14
- thoroughly documented and easily customizable
Original file line number Diff line number Diff line change 57
57
by running ``PS1_GIT=off`` on the command line.
58
58
"""
59
59
60
- __version__ = '0.2.2 '
60
+ __version__ = '0.3.0.dev1 '
61
61
__author__ = 'John T. Wodder II'
62
62
__author_email__ = 'ps1@varonathe.org'
63
63
__license__ = 'MIT'
@@ -267,6 +267,12 @@ def show_prompt_string(style, show_git=True):
267
267
if debian_chroot :
268
268
PS1 += style ('[{}] ' .format (debian_chroot ), fg = Color .BLUE , bold = True )
269
269
270
+ # If a Conda environment is active, show its prompt prefix (which already
271
+ # includes the parentheses and trailing space).
272
+ if 'CONDA_PROMPT_MODIFIER' in os .environ :
273
+ # Green like a snake!
274
+ PS1 += style (os .environ ['CONDA_PROMPT_MODIFIER' ], fg = Color .LIGHT_GREEN )
275
+
270
276
# If we're inside a Python virtualenv, show the basename of the virtualenv
271
277
# directory. (Note: As of virtualenv v20.0.27, we can't support custom
272
278
# virtualenv prompt prefixes, as virtualenv does not export the relevant
You can’t perform that action at this time.
0 commit comments