Skip to content

bclarkx2/pwd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

pwd is a Python tool to create a perfect bash prompt!

Features:

Supported version control systems: git

  • VCS: Repo and branch name

repo-branch-name-example

  • VCS: Remote display

remote-example

  • VCS: Dirty flag

dirty-flag-example

  • VCS: Divergence tracking

divergence-example

  • VCS: Submodule support

submodule-example

  • VCS: Detached HEAD warning

detached-head-example

  • User+hostname if on an external system

identity-example

  • Python virtual environment (limited)

venv-example missing-venv-example

Installation

Clone the git repo:

git clone git@github.com:bclarkx2/pwd

Install using make:

make install

Add the following line to your .bashrc (or other shell configuration files):

export PROMPT_COMMAND='PS1="$(pwd.py)"

Configuration

Username/hostname

If the current username and hostname are both equal to the respective values in the MY_USERNAME and MY_HOSTNAME environment variables, the user@hostname part of the prompt will be suppressed.

Licensing

This project is released under the MIT license. See LICENSE.md for details.