Code Monkey home page Code Monkey logo

gitbash-zsh-theme's Introduction

gitbash theme for zsh

A zsh prompt theme that mimics the default prompt from Git for Windows.

An uncanny recreation of git bash's default theme on Windows, complete with the inexplicable “MINGW64” string

Quick setup

  1. Clone this repo somewhere, for example ~/repos/gitbash-zsh-theme.
  2. Add the following to your ~/.zshrc:
fpath=(~/repos/gitbash-zsh-theme/functions $fpath)
autoload -U promptinit
promptinit
prompt gitbash

Replace ~/repos/gitbash-zsh-theme with wherever you cloned this repo.

Customization

Love git bash, but hate MINGW64? Well, lucky for you, you can change it to whatever you want. prompt gitbash takes one argument, which allows customizes this string:

prompt gitbash 'Your string here!'

Full installation instructions

This prompt is built using zsh's awesome prompt theme system. There's a few things that the prompt theme system needs:

First, a file called prompt_$THEME_setup to be somewhere on your $fpath. You can either copy functions/prompt_gitbash_setup to a directory on your current $fpath (Protip! Check which directories are on your $fpath with typeset -p fpath) or append this repo's functions dir to your $fpath (recommended).

Then you need to initialize the prompt system:

autoload -U promptinit
promptinit

Finally, you can use the prompt command to choose any prompt in your $fpath. You can list all the prompts available with:

prompt -l

You can preview prompts with:

prompt -p $THEME

Or preview all prompts with:

prompt -p

You can even change themes during sessions:

prompt gitbash
prompt restore

Inspiration

I used the file from the Git for Windows installation, namely, git-prompt.sh.

# License

© 2022 Eddie Antonio Santos. MIT licensed.

gitbash-zsh-theme's People

Contributors

eddieantonio avatar

Stargazers

 avatar

Watchers

 avatar  avatar

gitbash-zsh-theme's Issues

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.