Skip to content

Instantly share code, notes, and snippets.

@MAS150MD200
Forked from lborg019/README.md
Created May 17, 2018 16:15
Show Gist options
  • Save MAS150MD200/9d8bdceb7d36c47b1eef60a09b0aed08 to your computer and use it in GitHub Desktop.
Save MAS150MD200/9d8bdceb7d36c47b1eef60a09b0aed08 to your computer and use it in GitHub Desktop.

Revisions

  1. @lborg019 lborg019 revised this gist Feb 21, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion lukezin.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # Original theme https://github.com/agnoster zsh theme
    # Modified from smileart's https://gist.github.com/smileart/3750104
    # Change symbol characters, should work properly with any powerline font
    # Changed symbol characters, should work properly with any powerline font

    ZSH_THEME_GIT_PROMPT_DIRTY='±'

  2. @lborg019 lborg019 revised this gist Feb 21, 2016. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,5 @@
    - LS Colors match iTerm's Dark Solarized theme

    ### to do: ###
    - Fix tab completion: tab completion should automatically work on special characters (such as '[')
    right now you have to escape such characters for tab to complete it `\[`
    - Set it up to work over SSH
    - Fix tab completion: tab completion should automatically work on special characters (such as `[`)
    right now you have to escape such characters for tab to complete it `\[`
  3. @lborg019 lborg019 revised this gist Feb 21, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    ### Improvements to [smileart's agnoster](https://gist.github.com/smileart/3750104) theme mod: ###
    - Replaced special characters in the code (fixed bugged characters, currently works with powerline fonts)
    - Prompt is shorter, shows only the last directory
    - Prompt is shorter, shows only the current directory
    - LS Colors match iTerm's Dark Solarized theme

    ### to do: ###
  4. @lborg019 lborg019 revised this gist Feb 21, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # lukezin's .zsh-theme #

    ### Improvements to (smileart's agnoster)[https://gist.github.com/smileart/3750104] theme mod: ###
    ### Improvements to [smileart's agnoster](https://gist.github.com/smileart/3750104) theme mod: ###
    - Replaced special characters in the code (fixed bugged characters, currently works with powerline fonts)
    - Prompt is shorter, shows only the last directory
    - LS Colors match iTerm's Dark Solarized theme
  5. @lborg019 lborg019 revised this gist Feb 21, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    # lukezin's .zsh-theme #

    ### Improvements to smileart's agnoster theme fork: ###
    ### Improvements to (smileart's agnoster)[https://gist.github.com/smileart/3750104] theme mod: ###
    - Replaced special characters in the code (fixed bugged characters, currently works with powerline fonts)
    - Prompt is shorter, shows only the last directory
    - LS Colors match iTerm's Dark Solarized theme
  6. @lborg019 lborg019 revised this gist Feb 21, 2016. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,11 @@
    Improvements to smileart's agnoster theme fork:
    # lukezin's .zsh-theme #

    ### Improvements to smileart's agnoster theme fork: ###
    - Replaced special characters in the code (fixed bugged characters, currently works with powerline fonts)
    - Prompt is shorter, shows only the last directory
    - LS Colors match iTerm's Dark Solarized theme

    to do:
    ### to do: ###
    - Fix tab completion: tab completion should automatically work on special characters (such as '[')
    right now you have to escape such characters for tab to complete it `\[`
    - Set it up to work over SSH
  7. @lborg019 lborg019 revised this gist Feb 21, 2016. 2 changed files with 7 additions and 3 deletions.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    Improvements to smilart's agnoster theme fork:
    Improvements to smileart's agnoster theme fork:
    - Replaced special characters in the code (fixed bugged characters, currently works with powerline fonts)
    - Prompt is shorter, shows only the last directory
    - LS Colors match iTerm's Dark Solarized theme
    8 changes: 6 additions & 2 deletions lukezin.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    # Original theme https://github.com/agnoster zsh theme
    # Modified from smileart's https://gist.github.com/smileart/3750104
    # Change symbol characters, should work properly with any powerline font

    ZSH_THEME_GIT_PROMPT_DIRTY='±'

    @@ -30,14 +32,16 @@ function virtualenv_info {
    }

    PROMPT_HOST='%{%b%F{gray}%K{black}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{yellow}%} %n %{%F{black}%}'
    # PROMPT_DIR='%{%F{white}%} %~% '
    # {$fg[white%]\ to specify the foreground color
    # ' %c\ ' to show only the current directory surrounded by spaces
    PROMPT_DIR=%{$fg[white]%}\ %c\ %{$reset_color%}
    PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k%F{blue}%})%{%f%k%b%}'

    PROMPT='%{%f%b%k%}$PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU
    $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

    # LS colors, made with http://geoff.greer.fm/lscolors/
    # LS colors matching Solarized Dark Theme: http://ethanschoonover.com/solarized
    # made with http://geoff.greer.fm/lscolors/
    export LSCOLORS="exfxcxdxbxegedabagacad"
    export LS_COLORS='di=34;40:ln=35:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
  8. @lborg019 lborg019 revised this gist Feb 21, 2016. 2 changed files with 3 additions and 7 deletions.
    10 changes: 3 additions & 7 deletions lukezin.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,4 @@
    # Original theme https://github.com/agnoster zsh theme
    # Replaced the symbol characters in prompt to work properly with powerline fonts

    ZSH_THEME_GIT_PROMPT_DIRTY='±'

    @@ -31,17 +30,14 @@ function virtualenv_info {
    }

    PROMPT_HOST='%{%b%F{gray}%K{black}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{yellow}%} %n %{%F{black}%}'

    # %c or %. outputs the current directory only. '\ ' to give extra space after directory name
    # Coding the color back to white again was necessary
    # PROMPT_DIR='%{%F{white}%} %~% '
    PROMPT_DIR=%{$fg[white]%}\ %c\ %{$reset_color%}
    PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k%F{blue}%})%{%f%k%b%}'

    PROMPT='%{%f%b%k%}$PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU
    $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

    # LS colors match Solarized Dark Theme: http://ethanschoonover.com/solarized
    # made with http://geoff.greer.fm/lscolors/
    # LS colors, made with http://geoff.greer.fm/lscolors/
    export LSCOLORS="exfxcxdxbxegedabagacad"
    export LS_COLORS='di=34;40:ln=35:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
    export LS_COLORS='di=34;40:ln=35:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
    Binary file added shell_preview.png
    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.
  9. @lborg019 lborg019 revised this gist Feb 21, 2016. 2 changed files with 2 additions and 3 deletions.
    3 changes: 1 addition & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,5 +6,4 @@ Improvements to smilart's agnoster theme fork:
    to do:
    - Fix tab completion: tab completion should automatically work on special characters (such as '[')
    right now you have to escape such characters for tab to complete it `\[`
    - Set it up to work over SSH

    - Set it up to work over SSH
    2 changes: 1 addition & 1 deletion lukezin.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -42,6 +42,6 @@ $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

    # LS colors match Solarized Dark Theme: http://ethanschoonover.com/solarized
    # LS colors, made with http://geoff.greer.fm/lscolors/
    # made with http://geoff.greer.fm/lscolors/
    export LSCOLORS="exfxcxdxbxegedabagacad"
    export LS_COLORS='di=34;40:ln=35:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
  10. @lborg019 lborg019 revised this gist Feb 21, 2016. 4 changed files with 55 additions and 72 deletions.
    42 changes: 8 additions & 34 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,36 +1,10 @@
    # My modified fork of agnoster.zsh-theme
    Improvements to smilart's agnoster theme fork:
    - Replaced special characters in the code (fixed bugged characters, currently works with powerline fonts)
    - Prompt is shorter, shows only the last directory
    - LS Colors match iTerm's Dark Solarized theme

    A ZSH theme optimized for people who use:
    to do:
    - Fix tab completion: tab completion should automatically work on special characters (such as '[')
    right now you have to escape such characters for tab to complete it `\[`
    - Set it up to work over SSH

    - Solarized
    - Git
    - Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

    # Compatibility

    To test if your terminal and font support it, check that all the necessary characters are supported by copying the following command to your terminal: `echo "⮀ ± ⭠ ➦ ✔ ✘ ⚡"`. The result should look like this:

    ![Character Example](http://cl.ly/content/image/2l3w443z363P/aHR0cDovL2YuY2wubHkvaXRlbXMvM2ozTjJpMDMzTzJNM0ozcDFjMjgvU2NyZWVuJTIwU2hvdCUyMDIwMTItMDktMTQlMjBhdCUyMDEyLjA2LjAyJTIwLnBuZw==)

    ## What does it show?

    - Success (✔) or failure (✘) of previous command
    - Hostname
    - Git status
    - Branch (⭠) or detached head (➦)
    - Current branch / SHA1 in detached head state
    - Dirty working directory (±, color change)
    - Working directory
    - Elevated (root) privileges (⚡)

    ![Screenshot](http://i.imgur.com/aPmLi.png)

    ## Future Work

    I don't want to clutter it up too much, but I am toying with the idea of adding RVM (ruby version) and n (node.js version) display.

    It's currently hideously slow, especially inside a git repo. I guess it's not overly so for comparable themes, but it bugs me, and I'd love to hear ideas about how to improve the performance.

    Would be nice for the code to be a bit more sane and re-usable. Something to easily append a section with a given FG/BG, and add the correct opening and closing.

    Apparently the unicode characters don't display correctly on all systems. It would be nice to be able to say "this font will make it work, always". But what font?
    38 changes: 0 additions & 38 deletions agnoster.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,38 +0,0 @@
    # Original theme https://github.com/agnoster zsh theme

    ZSH_THEME_GIT_PROMPT_DIRTY='±'

    function _git_prompt_info() {
    ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="$(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
    echo "${ref/refs\/heads\//⭠ }$(parse_git_dirty)"
    }

    function _git_info() {
    if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
    local BG_COLOR=green
    if [[ -n $(parse_git_dirty) ]]; then
    BG_COLOR=yellow
    FG_COLOR=black
    fi

    if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
    BG_COLOR=red
    FG_COLOR=white
    fi
    echo "%{%K{$BG_COLOR}%}⮀%{%F{$FG_COLOR}%} $(_git_prompt_info) %{%F{$BG_COLOR}%K{blue}%}⮀"
    else
    echo "%{%K{blue}%}⮀"
    fi
    }

    function virtualenv_info {
    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
    }

    PROMPT_HOST='%{%b%F{gray}%K{black}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{yellow}%} %n %{%F{black}%}'
    PROMPT_DIR='%{%F{white}%} %~% '
    PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}⮀%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k%F{blue}%})⮀%{%f%k%b%}'

    PROMPT='%{%f%b%k%}$PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU
    $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
    47 changes: 47 additions & 0 deletions lukezin.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,47 @@
    # Original theme https://github.com/agnoster zsh theme
    # Replaced the symbol characters in prompt to work properly with powerline fonts

    ZSH_THEME_GIT_PROMPT_DIRTY='±'

    function _git_prompt_info() {
    ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="$(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
    echo "${ref/refs\/heads\// }$(parse_git_dirty)"
    }

    function _git_info() {
    if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
    local BG_COLOR=green
    if [[ -n $(parse_git_dirty) ]]; then
    BG_COLOR=yellow
    FG_COLOR=black
    fi

    if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
    BG_COLOR=red
    FG_COLOR=white
    fi
    echo "%{%K{$BG_COLOR}%}%{%F{$FG_COLOR}%} $(_git_prompt_info) %{%F{$BG_COLOR}%K{blue}%}"
    else
    echo "%{%K{blue}%}"
    fi
    }

    function virtualenv_info {
    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
    }

    PROMPT_HOST='%{%b%F{gray}%K{black}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{yellow}%} %n %{%F{black}%}'

    # %c or %. outputs the current directory only. '\ ' to give extra space after directory name
    # Coding the color back to white again was necessary
    PROMPT_DIR=%{$fg[white]%}\ %c\ %{$reset_color%}
    PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k%F{blue}%})%{%f%k%b%}'

    PROMPT='%{%f%b%k%}$PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU
    $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

    # LS colors match Solarized Dark Theme: http://ethanschoonover.com/solarized
    # LS colors, made with http://geoff.greer.fm/lscolors/
    export LSCOLORS="exfxcxdxbxegedabagacad"
    export LS_COLORS='di=34;40:ln=35:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
    Binary file removed screenshot.png
    Binary file not shown.
  11. @smileart smileart revised this gist Mar 24, 2014. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions agnoster.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -35,6 +35,4 @@ PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}⮀%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k

    PROMPT='%{%f%b%k%}$PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU
    $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

    prompt_smileart_setup "$@"
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
  12. Serge Bedzhik revised this gist Jun 18, 2013. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion agnoster.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -35,4 +35,6 @@ PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}⮀%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k

    PROMPT='%{%f%b%k%}$PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU
    $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'

    prompt_smileart_setup "$@"
  13. Serge Bedzhik revised this gist Oct 3, 2012. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions agnoster.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -13,11 +13,11 @@ function _git_info() {
    if [[ -n $(parse_git_dirty) ]]; then
    BG_COLOR=yellow
    FG_COLOR=black
    else
    if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
    BG_COLOR=red
    FG_COLOR=white
    fi
    fi

    if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
    BG_COLOR=red
    FG_COLOR=white
    fi
    echo "%{%K{$BG_COLOR}%}⮀%{%F{$FG_COLOR}%} $(_git_prompt_info) %{%F{$BG_COLOR}%K{blue}%}⮀"
    else
  14. Serge Bedzhik revised this gist Sep 19, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -23,7 +23,7 @@ To test if your terminal and font support it, check that all the necessary chara
    - Working directory
    - Elevated (root) privileges (⚡)

    ![Screenshot](https://gist.github.com/raw/3712874/de4828056ec1f04b03dbf4940f1b61e525ec9799/screenshot.png)
    ![Screenshot](http://i.imgur.com/aPmLi.png)

    ## Future Work

  15. Serge Bedzhik revised this gist Sep 19, 2012. 2 changed files with 18 additions and 7 deletions.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # agnoster.zsh-theme
    # My modified fork of agnoster.zsh-theme

    A ZSH theme optimized for people who use:

    23 changes: 17 additions & 6 deletions agnoster.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # https://github.com/agnoster zsh theme
    # Original theme https://github.com/agnoster zsh theme

    ZSH_THEME_GIT_PROMPT_DIRTY='±'

    @@ -12,16 +12,27 @@ function _git_info() {
    local BG_COLOR=green
    if [[ -n $(parse_git_dirty) ]]; then
    BG_COLOR=yellow
    FG_COLOR=black
    else
    if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
    BG_COLOR=red
    FG_COLOR=white
    fi
    fi
    echo "%{%K{$BG_COLOR}%}⮀%{%F{black}%} $(_git_prompt_info) %{%F{$BG_COLOR}%K{blue}%}⮀"
    echo "%{%K{$BG_COLOR}%}⮀%{%F{$FG_COLOR}%} $(_git_prompt_info) %{%F{$BG_COLOR}%K{blue}%}⮀"
    else
    echo "%{%K{blue}%}⮀"
    fi
    }

    PROMPT_HOST='%{%b%F{gray}%K{black}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{gray}%} %m %{%F{black}%}'
    PROMPT_DIR='%{%F{white}%} %1~ '
    function virtualenv_info {
    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
    }

    PROMPT_HOST='%{%b%F{gray}%K{black}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{yellow}%} %n %{%F{black}%}'
    PROMPT_DIR='%{%F{white}%} %~% '
    PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}⮀%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k%F{blue}%})⮀%{%f%k%b%}'

    PROMPT='%{%f%b%k%}
    $PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU '
    PROMPT='%{%f%b%k%}$PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU
    $(virtualenv_info)❯ '
    RPROMPT='%{$fg[green]%}[%*]%{$reset_color%}'
  16. @agnoster agnoster revised this gist Sep 14, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ A ZSH theme optimized for people who use:

    To test if your terminal and font support it, check that all the necessary characters are supported by copying the following command to your terminal: `echo "⮀ ± ⭠ ➦ ✔ ✘ ⚡"`. The result should look like this:

    ![Character Example](http://cl.ly/image/2l3w443z363P)
    ![Character Example](http://cl.ly/content/image/2l3w443z363P/aHR0cDovL2YuY2wubHkvaXRlbXMvM2ozTjJpMDMzTzJNM0ozcDFjMjgvU2NyZWVuJTIwU2hvdCUyMDIwMTItMDktMTQlMjBhdCUyMDEyLjA2LjAyJTIwLnBuZw==)

    ## What does it show?

  17. @agnoster agnoster revised this gist Sep 14, 2012. 1 changed file with 7 additions and 3 deletions.
    10 changes: 7 additions & 3 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -6,9 +6,11 @@ A ZSH theme optimized for people who use:
    - Git
    - Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

    To test if your terminal and font support it, check that all the necessary characters are supported by copying the following command to your terminal: `echo "⮀±⭠ ➦✔✘⚡"`. The result should look like this:
    # Compatibility

    ![Character Example](http://cl.ly/image/3m3b0k2g2Y1A/Screen%20Shot%202012-09-14%20at%2012.01.14%20.png)
    To test if your terminal and font support it, check that all the necessary characters are supported by copying the following command to your terminal: `echo "⮀ ± ⭠ ➦ ✔ ✘ ⚡"`. The result should look like this:

    ![Character Example](http://cl.ly/image/2l3w443z363P)

    ## What does it show?

    @@ -29,4 +31,6 @@ I don't want to clutter it up too much, but I am toying with the idea of adding

    It's currently hideously slow, especially inside a git repo. I guess it's not overly so for comparable themes, but it bugs me, and I'd love to hear ideas about how to improve the performance.

    Would be nice for the code to be a bit more sane and re-usable. Something to easily append a section with a given FG/BG, and add the correct opening and closing.
    Would be nice for the code to be a bit more sane and re-usable. Something to easily append a section with a given FG/BG, and add the correct opening and closing.

    Apparently the unicode characters don't display correctly on all systems. It would be nice to be able to say "this font will make it work, always". But what font?
  18. @agnoster agnoster revised this gist Sep 14, 2012. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,10 @@ A ZSH theme optimized for people who use:
    - Git
    - Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

    To test if your terminal and font support it, check that all the necessary characters are supported by copying the following command to your terminal: `echo "⮀±⭠ ➦✔✘⚡"`. The result should look like this:

    ![Character Example](http://cl.ly/image/3m3b0k2g2Y1A/Screen%20Shot%202012-09-14%20at%2012.01.14%20.png)

    ## What does it show?

    - Success (✔) or failure (✘) of previous command
    @@ -25,4 +29,4 @@ I don't want to clutter it up too much, but I am toying with the idea of adding

    It's currently hideously slow, especially inside a git repo. I guess it's not overly so for comparable themes, but it bugs me, and I'd love to hear ideas about how to improve the performance.

    Would be nice for the code to be a bit more sane and re-usable. Something to easily append a section with a given FG/BG, and add the correct opening and closing.
    Would be nice for the code to be a bit more sane and re-usable. Something to easily append a section with a given FG/BG, and add the correct opening and closing.
  19. @agnoster agnoster revised this gist Sep 13, 2012. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -22,3 +22,7 @@ A ZSH theme optimized for people who use:
    ## Future Work

    I don't want to clutter it up too much, but I am toying with the idea of adding RVM (ruby version) and n (node.js version) display.

    It's currently hideously slow, especially inside a git repo. I guess it's not overly so for comparable themes, but it bugs me, and I'd love to hear ideas about how to improve the performance.

    Would be nice for the code to be a bit more sane and re-usable. Something to easily append a section with a given FG/BG, and add the correct opening and closing.
  20. @agnoster agnoster revised this gist Sep 13, 2012. 1 changed file with 24 additions and 0 deletions.
    24 changes: 24 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # agnoster.zsh-theme

    A ZSH theme optimized for people who use:

    - Solarized
    - Git
    - Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

    ## What does it show?

    - Success (✔) or failure (✘) of previous command
    - Hostname
    - Git status
    - Branch (⭠) or detached head (➦)
    - Current branch / SHA1 in detached head state
    - Dirty working directory (±, color change)
    - Working directory
    - Elevated (root) privileges (⚡)

    ![Screenshot](https://gist.github.com/raw/3712874/de4828056ec1f04b03dbf4940f1b61e525ec9799/screenshot.png)

    ## Future Work

    I don't want to clutter it up too much, but I am toying with the idea of adding RVM (ruby version) and n (node.js version) display.
  21. @agnoster agnoster revised this gist Sep 13, 2012. 1 changed file with 0 additions and 0 deletions.
    Binary file added screenshot.png
    Loading
    Sorry, something went wrong. Reload?
    Sorry, we cannot display this file.
    Sorry, this file is invalid so it cannot be displayed.
  22. @agnoster agnoster created this gist Sep 13, 2012.
    27 changes: 27 additions & 0 deletions agnoster.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # https://github.com/agnoster zsh theme

    ZSH_THEME_GIT_PROMPT_DIRTY='±'

    function _git_prompt_info() {
    ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="$(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
    echo "${ref/refs\/heads\//⭠ }$(parse_git_dirty)"
    }

    function _git_info() {
    if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
    local BG_COLOR=green
    if [[ -n $(parse_git_dirty) ]]; then
    BG_COLOR=yellow
    fi
    echo "%{%K{$BG_COLOR}%}⮀%{%F{black}%} $(_git_prompt_info) %{%F{$BG_COLOR}%K{blue}%}⮀"
    else
    echo "%{%K{blue}%}⮀"
    fi
    }

    PROMPT_HOST='%{%b%F{gray}%K{black}%} %(?.%{%F{green}%}✔.%{%F{red}%}✘)%{%F{gray}%} %m %{%F{black}%}'
    PROMPT_DIR='%{%F{white}%} %1~ '
    PROMPT_SU='%(!.%{%k%F{blue}%K{black}%}⮀%{%F{yellow}%} ⚡ %{%k%F{black}%}.%{%k%F{blue}%})⮀%{%f%k%b%}'

    PROMPT='%{%f%b%k%}
    $PROMPT_HOST$(_git_info)$PROMPT_DIR$PROMPT_SU '