Skip to content

Instantly share code, notes, and snippets.

@Shinpeim
Created August 16, 2016 06:21
Show Gist options
  • Save Shinpeim/eb1ca8d55ae9793e20a13f5bf88630d0 to your computer and use it in GitHub Desktop.
Save Shinpeim/eb1ca8d55ae9793e20a13f5bf88630d0 to your computer and use it in GitHub Desktop.

Revisions

  1. Shinpeim created this gist Aug 16, 2016.
    14 changes: 14 additions & 0 deletions mytheme.zsh-theme
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    autoload -Uz vcs_info
    zstyle ':vcs_info:*' formats '[%r - %b](%s)'
    zstyle ':vcs_info:*' actionformats '(%s)-[%r - %b|%a]'
    precmd () {
    psvar=()
    LANG=en_US.UTF-8 vcs_info
    [[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_ "
    psvar[2]=$(date +'%m/%d %H:%M:%S');
    }


    PS_OK=$'\n''%1(v|%F{green}%1v%f|)%F{green}[CURRENT=%~] %F{white}[%2v]'$'\n%F{white} %F{green}✔ %f'
    PS_NG=$'\n''%1(v|%F{red}%1v%f|)%F{red}[CURRENT=%~] %F{white}[%2v]'$'\n%F{white} %F{red}✘ %f'
    PROMPT="%0(?|${PS_OK}|${PS_NG})"