Giter Site home page Giter Site logo

zsh-prompt-iggy's Introduction

Deprecation

This prompt is not being actively developed any more. I switched to a prompt based on powerlevel9k. My powerlevel9k-config is saved in this gist. It needs to be loaded before the prompt itself. The powerlevel9k-prompt looks and feels very similar to the prompt of this repository, but it has some more features.

iggy

iggy is a super happy awesome Powerline-style, Git-aware prezto theme. Prezto and its git module are required to use this. Also, you need a powerline patched font. I recommend picking one of these:

I, myself, use Menlo-Powerline.

zsh-prompt-iggy

Features

The status line is divided into many colored segments:

  • Status segment
    • A red cross (✘) indicates an exit code different from 0 (last command unsuccessful)
    • A green lightning (⚡) indicates super powers
    • A blue percent-symbol (﹪) shows that there are background jobs
  • Current working directory
    • Abbreviated path - only the last directory in the path is fully qualified
    • Red background if you have no write access to the current working directory
  • User@host
    • Only shown if
      • Another user than the $default_user is logged in
      • Or if you are connected via SSH
  • Git status
    • Colors
      • green: clean working copy
      • yellow: you have a stash
      • red: the working copy is dirty
    • Current git branch or commit
    • ?2 if there are 2 untracked files/directories in the working copy
    • if there are added files in the staging area
    • if there are deleted files in the staging area
    • ✖5 if there are 5 deleted files not yet staged
    • if there are renamed/moved files in the staging area
    • if there are modified files in the staging area
    • ✱2 if there are 2 modified files not yet staged
    • ⬆ 3 if you have 3 commits that are not on the remote
    • ⬇ 5 if there are 5 commits on the remote that you don't have
    • s7 if you stashed 7 times
    • some more information in rebase, merge and so on...
  • Git subdirectory
    • If you are in a git working copy, the current working directory is split into two parts: The path of the working copy and the path relative to it. The former is displayed in the "Current working directory" segment in the abovementioned abbreviated form while the latter is displayed in the gray git directory segment to the right of the git status.

Also, you have the current date and time in the right prompt.

The arrowhead symbol in the second line is colored depending on the state:

  • orange-ish: normal color
  • red: last exit code was not 0
  • green: you have super powers

If this arrowhead symbol points to the left, you entered the alternate mode (e.g. "normal mode" for vi key bindings).

Installation

Make sure, that your terminal is running with 256 colors support. Some terminals support setting this in their preferences, like iterm2 for OS X. The default terminal for Gnome, for example, has no such option. There, you need to set TERM=xterm-256color in your ~/.zshrc.

Simply copy the prompt_iggy_setup to ~/.zprezto/modules/prompt/functions/. Edit your ~/.zpreztorc changing

zstyle ':prezto:module:prompt' theme 'your_current_theme'

to

zstyle ':prezto:module:prompt' theme 'iggy'

Configuration

In your ~/.zshrc, add

default_user=eugenk

but pick your own username ;)

If you don't set this variable, the user@host segment is only displayed, if you are connected via SSH.

zsh-prompt-iggy's People

Contributors

eugenk avatar

Stargazers

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

Watchers

 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.