aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorSudarshan Wadkar <git@wadkar.net>2016-05-14 21:00:40 +0300
committerSudarshan Wadkar <git@wadkar.net>2016-06-03 22:50:37 +0300
commit99429ab26818d539418ac6345679d38f18b32faf (patch)
tree13cbe03ad1d9d59326ee9acaf1e9763a34e03f7f /README.md
parent41888bf2a96e13a33db696c51963986472c9d91f (diff)
Add new pyenv segment to show active python version
This commit provides a new segment `pyenv` to show current python environment. This prompt can be used in place of `virtualenv` segment. However, it is targeted at users of [pyenv](https://github.com/yyuu/pyenv) and not meant to replace the `virtualenv` segment. The prompt works by parsing output of `pyenv version` and displaying the first word of the output as segment text. The design (color etc.) is same as the `virtualenv` segment including the icon. The segment would need to be revisited if `pyenv version` changes its output format. Tested on my personal machines (Mac OSX 10.11.4 and Ubuntu 15.04).
Diffstat (limited to 'README.md')
-rw-r--r--README.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/README.md b/README.md
index b954d03e..bff47f24 100644
--- a/README.md
+++ b/README.md
@@ -116,6 +116,7 @@ The segments that are currently available are:
* **Python Segments:**
* `virtualenv` - Your Python [VirtualEnv](https://virtualenv.pypa.io/en/latest/).
* [`anaconda`](#anaconda) - Your active [Anaconda](https://www.continuum.io/why-anaconda) environment.
+ * `pyenv` - Your active python version as reported by the first word of [`pyenv version`](https://github.com/yyuu/pyenv). Note that the segment is not displayed if that word is _system_ i.e. the segment is inactive if you are using system python.
* **Ruby Segments:**
* [`chruby`](#chruby) - Ruby environment information using `chruby` (if one is active).
* [`rbenv`](#rbenv) - Ruby environment information using `rbenv` (if one is active).