Code Monkey home page Code Monkey logo

gitprompt's Introduction

gitprompt -- A Bash prompt which integrates git status.

Project status

The current version is 1.2.1.

A brief article about it has been published in Hacker Noon: https://hackernoon.com/why-linux-developers-should-use-gitprompt-8d654e5b87e1

Installation

To install gitprompt, first cd to a suitable directory where you want to install it. Let's say you want to install it in your home directory, so just type:

$ cd
$ git clone https://www.github.com/enfors/gitprompt

To run it, run the following commands in your Bash prompt:

$ cd gitprompt
$ . gitprompt.sh

If you want it all the time, add the following to your .profile or .bashrc:

. ~/gitprompt/gitprompt.sh

Happy Hacking!

Features

GitPrompt has a small but growing number of features

Showing git status

The main feature of GitPrompt is, as the name implies, to display git status (if files have been modified since the last commit, etc) in the prompt.

Showing exit status

If a command failes with a non-zero exit status, this status will be displayed in the prompt, reducing the risk that the user will miss it.

Showing the current time in the prompt

Every time you press enter, the current time on the machine will be displayed in the prompt.

Showing username and hostname

If you use many different accounts on many different machines, it is useful to always have the current username and hostname displayed in the prompt.

Showing host aliases

If you have a lot of different machines with less-than-helpful hostnames, which is sometimes the case, then you can set a shell variable called HOSTALIAS to a more descriptive name and it too will be displayed in the prompt.

Customizing the colors

You can customize the colors used with the GPConfig command. If things go wrong, you can reset the config with GPReset.

gitprompt's People

Contributors

enfors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.