Skip to content

Instantly share code, notes, and snippets.

@dmytro
Created November 27, 2012 05:40
Show Gist options
  • Select an option

  • Save dmytro/4152569 to your computer and use it in GitHub Desktop.

Select an option

Save dmytro/4152569 to your computer and use it in GitHub Desktop.

Revisions

  1. dmytro revised this gist Nov 27, 2012. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions prompt.zsh
    Original file line number Diff line number Diff line change
    @@ -6,12 +6,9 @@ precmd() {

    setopt prompt_subst
    zstyle ':vcs_info:git:*' check-for-changes true

    # Colors
    # zstyle ':vcs_info:*' formats "%f[%%n@%%m %1~] $ " "%F{5}%a %m%u%c %F{6}%b:%F{3}%r/%S"
    zstyle ':vcs_info:*' formats "%f[%%n@%%m %1~] $ " "%f%a %F{3}%m%u%c %f%b:%r/%S"
    zstyle ':vcs_info:*' nvcsformats "%f[%n@%m %1~]$ " ""
    zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '

    PROMPT='${vcs_info_msg_0_}'
    RPROMPT='${vcs_info_msg_1_}'
    RPROMPT='${vcs_info_msg_1_}'
  2. dmytro created this gist Nov 27, 2012.
    17 changes: 17 additions & 0 deletions prompt.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    autoload -Uz vcs_info
    zstyle ':vcs_info:*' enable git
    precmd() {
    vcs_info
    }

    setopt prompt_subst
    zstyle ':vcs_info:git:*' check-for-changes true

    # Colors
    # zstyle ':vcs_info:*' formats "%f[%%n@%%m %1~] $ " "%F{5}%a %m%u%c %F{6}%b:%F{3}%r/%S"
    zstyle ':vcs_info:*' formats "%f[%%n@%%m %1~] $ " "%f%a %F{3}%m%u%c %f%b:%r/%S"
    zstyle ':vcs_info:*' nvcsformats "%f[%n@%m %1~]$ " ""
    zstyle ':vcs_info:*' actionformats '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '

    PROMPT='${vcs_info_msg_0_}'
    RPROMPT='${vcs_info_msg_1_}'