This theme is highly inspired by jeremyFreeAgent's Powerline theme and by agnoster's one
Here is a quick demo of this theme : http://ascii.io/a/1774
In this repository, you'll find my ZSH theme. This theme is really cutomizable as I use it in different environments (Ubuntu, OS X, Desktop, Server). The only things that are not easilly customizable at the moment are the segment colors.
To use this theme, you'll need to install Oh My ZSH and put the content of this repository in your home directory. Then restart your terminal session and everything shold be OK.
There are several things to customize in this theme :
- Every symbol used in the prompt : check out the variables list at the top of the theme file
- Prompt components : check out how to do this in the .zshrc file
You can also define your own component and add them to your prompt :
- A component is a simple function with a name beginning with
prompt_
- It takes at least one argument which is a callback to the segment renderer function (this is needed to be able to put the segment at the right or left prompt)
Check out examples in the theme file
- PHP
- Vagrant
- Git
- Screen
- Install
- Example
- URLs
- Commands
$ git clone git://github.com/jubianchi/gitconfig.git gitconfig
$ mv gitconfig/* $HOME
$ git config --global user.name <your-username>
$ git config --global user.email <your-email>
$ git config --global github.user <your-github-username>
$ git config --global github.password <your-github-password>
$ git aliases
$ mkdir my-repository
$ git cl ghs:me/my-repository php
$ git go new-feature
# On branch new-feature
# Commit, commit, commit...
# Sleep
$ git pullor master
# Commit, commit, commit...
$ git finish master
# Reorder, squash...
# On branch master
$ git pullor master
$ git pushor master
Alias for Github clone URL (SSH protocol) :
$ git clone ghs:jubianchi/atoum
# Shortcut for git clone git@github.com:jubianchi/atoum
Alias for Github clone URL (Git readonly protocol) :
$ git clone gh:jubianchi/atoum
# Shortcut for git clone git://github.com/jubianchi/atoum
Alias for Gist clone URL (SSH protocol) :
$ git clone gists:a52e82e9ccc25449c325.git
# Shortcut for git clone git@gist.github.com:a52e82e9ccc25449c325.git
Alias for BitBucket clone URL (SSH protocol) :
$ git clone bbs:jubianchi/atoum
# Shortcut for git clone git@bitbucket.org:jubianchi/atoum
Alias for BitBucket clone URL (HTTPS readonly protocol) :
$ git clone bb:jubianchi/atoum
# Shortcut for git clone https://bitbucket.org/jubianchi/atoum
Cleans up the repository by pruning remote, running GC and clearing stash
$ git cleanup [<remote>] (Default: origin)
Adds an entry to the .gitignore file
$ git ignore <entry>
Create a new empty repository with an empty initial commit. This alias lets you chosse a template to init your repository (one of php, default)
$ git make [<initial-commit-message>] (Default: Initial commit) [<template>]
Clones a remote repository and lets you choose a template (one of php, default).
$ git cl <url> [<template>]
Lists all available aliases
$ git aliases
Adds all files that are not staged and displays a light status
$ git addall
Alias for git add --patch
$ git patch
Unstages file
$ git unadd <file[, file, …]>
Amends the last commits keeping its original message
Alias for git commit --amend -C HEAD
$ git amend
Cherry-picks a commit and edit message
Alias for git cherry-pick -ex
$ git cp <sha1>
Resets the last commit keeping the modifications (soft reset) and displays a light status
$ git undo
Displays branches list
Aliases for git branch
# Displays local branches
$ git br
# Displays all branches (local + remote)
$ git bra
# Displays remote branches
$ git brr
# Displays all (local + remote) not merged branches
$ git brn
Checkout a new branch
Aliases for git checkout -b
$ git cb <branch>
Displays the name of the current branch
$ git pwd
Checkout the develop or master branch
Aliases for git checkout
$ git master
$ git develop
You could have one alias for each long running branch in your repositories configuration file
Creates (if it does not exist) and checkout a branch
$ git go <branch>
Finishes the current topic branch by interactively rebasing its commits and merging it into another branch
$ git finish <branch>
Starts a WIP branch saving the current moidifications to a new commit and gets you back to your working branch.
$ git wip <branch>
Aliases for git diff
to bypass pager caveat
$ git d
# Alias for git diff --cached
$ git dc
Displays current diff stats
Alias git diff --stat
$ git stat
Displays an interactive status screen
Alias for git status
using tig
$ git st
Displays a light status
$ git ls
Pulls will be automatically rebased when using these aliases
Runs actions on remotes :
- or : origin
- up : upstream
Aliases for git (?:fetch|pull|push)
$ git fetchor
$ git fetchup
$ git pullor [<branch>]
$ git pullup [<branch>]
$ git pushor [<branch>]
$ git pushup [<branch>]
Pulls a remote branch and automatically rebase
Alias for git pull --rebase
$ git rp <remote> [<branch>]
Adds a new remote
Alias for git remote add
$ git radd <name> <url>
```
#### Log
##### git l
Alias for ```git log``` to bypass pager caveat
```sh
$ git l
Displays a nice formatted graph
Alias for git log
$ git graph
Runs usefull git utilities :
- g : Alias for
git gui
- k : Alias for
gitk
- t : Alias for
tig
$ git g
$ git k
$ git t
Lets you quickly build a Gist
$ git gist
$ git feature <start|sync|finish|...>
$ git fstart
$ git fsync
$ git ffinish
$ git fpublish
If you work a lot with Github, check out defunkt/hub which is a great tool integrating Github's features to git