Skip to content

Commit 3362a98

Browse files
authored
Add example to README
Explain how the plugin can be used to find unused installations.
1 parent c005853 commit 3362a98

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,28 @@ For example, to get a list of all versions linked to a virtual environment:
6262
3.8.6
6363
pypy3.6-7.3.1
6464
65+
The list of linked versions can be combined with the list of all installed
66+
versions to show which installations are not linked to any environment in the
67+
specified directory:
68+
69+
.. code-block:: bash
70+
71+
$ pyenv versions
72+
* system (set by /home/peter/.local/pyenv/version)
73+
3.6.10
74+
3.7.5
75+
3.7.9
76+
3.8.6
77+
3.9.1
78+
pypy3.6-7.3.0
79+
pypy3.6-7.3.1
80+
81+
$ comm -3 <(pyenv users --raw ~ | cut -d: -f1 | uniq) <(pyenv versions | tail -n+2 | tr -d "[:blank:]") | tr -d "[:blank:]"
82+
3.6.10
83+
3.7.5
84+
3.9.1
85+
pypy3.6-7.3.0
86+
6587
6688
Disclaimer
6789
----------

0 commit comments

Comments
 (0)