Giter Site home page Giter Site logo

fast-git-prompt's Introduction

fast-git-prompt

A fast git prompt for zsh and bash.

This is a work in progress. More features will be added in the future.

Installation

cargo install fast-git-prompt

Make sure you have $HOME/.cargo/bin in your $PATH.

Usage

Include fast-git-prompt in your .zshrc or .bashrc file as part of your prompt.

Configuration

Create a file called config.json in your $XDG_CONFIG_HOME/fast-git-prompt or $HOME/.config/fast-git-prompt directory. The configuration of the prompt is fully modular and customizable.

Example

{
  "version-do-not-modify": "0.1.0",
  "schema": "$XDG_CONFIG_HOME/fast-git-prompt/schema.json",
  "baseColor": "white",
  "prompt": [
    // Your prompt parts go here
  ]
}

Prompt Parts

Branch Name

The branch name is the name of the current branch.

{
  "type": "branchName",
  "color": "white" // Optional
}

Origin Icon

The origin icon is the icon of the current branch's remote.

{
  "type": "originIcon",
  "icons": {
    "github.com": {
      "icon": "",
      "color": "white"
    },
    "gitlab.com": {
      "icon": "",
      "color": "brightRed"
    }
  },
  "defaultIcon": {
    "icon": "",
    "color": "orange"
  }
}

Branch Status

The branch status is the status of the current branch.

{
  "type": "BranchStatus",
  "dirty": {
    "color": "red",
    "icon": ""
  },
  "clean": {
    "color": "green",
    "icon": "󰸞"
  },
  "deleted": {
    "color": "red",
    "icon": ""
  },
  "changed": {
    "color": "yellow",
    "icon": ""
  },
  "new": {
    "color": "yellow",
    "icon": ""
  }
}

Branch Sync

The branch sync is the sync status of the current branch.

{
  "type": "BranchSync",
  "ahead": {
    "icon": ""
  },
  "behind": {
    "icon": ""
  }
}

Colors

You can currently only use ansi colors. Which will use by your terminal emulator.

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • brightBlack
  • brightRed
  • brightGreen
  • brightYellow
  • brightBlue
  • brightMagenta
  • brightCyan
  • brightWhite

fast-git-prompt's People

Contributors

mastergordon avatar

Watchers

 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.