Skip to content

Instantly share code, notes, and snippets.

@miki725
miki725 / .bash_prompt.sh
Last active October 15, 2024 22:32
Custom bash prompt which displays: (virtualenv) user:/path (git-branch)
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch of the current git/mercurial repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.