Andreas Karatzas
Andreas Karatzas

Reputation: 21

How to display Python version in 'oh-my-zsh'

I am trying to display the python version next to my python venv using oh-my-zsh with powershell9k theme. Does anyone have any idea how?

I tried adding virtualenv --version under virtualenv in ~/.p10k.zsh but it didn't work as I imagined.

Upvotes: 1

Views: 1992

Answers (1)

J_H
J_H

Reputation: 20540

To obtain a SemVer version you can use something like this:

python --version | sed 's,Python ,,'

Upvotes: 1

Related Questions