A script for Git-aware customization of the command prompt in Bash and zsh

ps1.py

Here we have yet another script for Git-aware customization of the command prompt in Bash and zsh. Unlike all the other scripts, I wrote this one, so it’s better.

Features:

  • lets you know if you have mail in $MAIL
  • shows chroot and virtualenv prompt prefixes
  • automatically truncates the current directory path if it gets too long
  • shows the status of the current Git repository (see below)
  • thoroughly documented and easily customizable
  • supports both Bash and zsh
  • can optionally output just the Git status, in case you want to combine it with your own prompt string

Requirements

  • Python 3, version 3.5 or higher
  • Git, version 1.7.10 or higher
  • bash or zsh

Installation & Setup

  1. Save ps1.py to your

     

     

     

    To finish reading, please visit source site