Created
June 29, 2015 12:07
-
-
Save ykomatsu/4beec84806cb11ec2031 to your computer and use it in GitHub Desktop.
prompt_ykomatsu_setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/zsh | |
prompt_ykomatsu_precmd() { | |
vcs_info | |
} | |
prompt_ykomatsu_setup() { | |
prompt_opts=(cr percent sp subst) | |
autoload -Uz add-zsh-hook vcs_info | |
add-zsh-hook precmd prompt_ykomatsu_precmd | |
zstyle ':vcs_info:*' enable git | |
zstyle ':vcs_info:git:*' formats '%F{magenta}%b%f' | |
zstyle ':vcs_info:git:*' actionformats '%F{magenta}%b/%a%%f' | |
prompt="%F{cyan}%~%f ${vcs_info_msg_0_} | |
%(#.%F{red}%n%f .)%(?.%F{blue}➤.%F{red}%? ✘)%f " | |
} | |
prompt_ykomatsu_setup "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment