Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scottchiefbaker/perl-git-prompt
Git extension for the bash prompt
https://github.com/scottchiefbaker/perl-git-prompt
Last synced: 9 days ago
JSON representation
Git extension for the bash prompt
- Host: GitHub
- URL: https://github.com/scottchiefbaker/perl-git-prompt
- Owner: scottchiefbaker
- License: gpl-3.0
- Created: 2013-11-08T01:26:22.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T17:23:29.000Z (over 1 year ago)
- Last Synced: 2024-10-17T23:00:01.928Z (19 days ago)
- Language: Perl
- Size: 39.1 KB
- Stars: 9
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
perl-git-prompt
===============Perl script to show current Git branch and changeset status in the prompt.
## Usage
Put the following in your `~/.bashrc`
~~~bash
# Add git status to the existing bash prompt
GIT_PROMPT_PATH="$HOME/github/perl-git-prompt/git-prompt.pl"
if [[ $GIT_PROMPT_PATH != *$PS1* ]]; then
export PS1="\$($GIT_PROMPT_PATH)"$PS1
fi
~~~Examples:
---------
![Example Prompt](http://www.perturb.org/images/git-prompt-1.png)* You are on the **vader** branch.
* Your local repo is **+1** commit ahead of the remote
* There are **5** files in the staging area![Example Prompt](http://www.perturb.org/images/git-prompt-2.png)
* You are on the **vader** branch.
* Your local repo is on the same commit as the remote
* There are no files in the staging areaNote:
-----
This script assumes you have 256 color terminal support. It's 2013, you
should have a 256 color terminal. If you still have a 16 color terminal
no guarantees how this will look.