Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Latest commit

 

History

History
33 lines (21 loc) · 972 Bytes

README.rst

File metadata and controls

33 lines (21 loc) · 972 Bytes

git-venv-prompt

A Bash prompt that shows Git and Python virtual environment information in color.

Screenshot

Features

The prompt can be read as follows:

  • The username and host are displayed in violet
  • The current directory name is displayed in blue
  • If the current directory is part of a Git repository, the prompt will show
    • the current branch name in cyan;
    • the number of staged files (if any) indicated by + in green;
    • the number of modified files (if any) indicated by ! in yellow;
    • the number of untracked files (if any) indicated by ? in red.
  • If a Python virtual environment is activated, its root directory name will be indicated in magenta.

Usage

Download the script git_venv_prompt.sh to your home directory and add the following line to your ~/.bashrc or ~/.bash_profile file:

source ~/git_venv_prompt.sh