cdevinesr / gitline

Git status information on your Bash shell prompt.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gitline

Git status information on your Bash shell prompt.

Instructions for Use

  1. Place gitline.sh in your preferred location (example suggests your home directory).
  2. Modify your .bashrc to include something like this:
source ~/gitline.sh

build_ps1() {
    local git_line=$(generate_gitline)
    export PS1="\[\e[1;36m\]\u@\h \[\e[1;31m\]\w${git_line}\[\e[1;36m\]\$\[\e[0m\] "
}

export PROMPT_COMMAND="build_ps1"

About

Git status information on your Bash shell prompt.

License:MIT License


Languages

Language:Shell 100.0%