diff options
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index cee6acad..83d7314c 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -61,6 +61,7 @@ case $POWERLEVEL9K_MODE in TEST_ICON="\uE891" # OK_ICON="\u2713" # ✓ FAIL_ICON="\u2718" # ✘ + SYMFONY_ICON="SF" VCS_UNTRACKED_ICON="\uE16C" # VCS_UNSTAGED_ICON="\uE17C" # VCS_STAGED_ICON="\uE168" # @@ -89,6 +90,7 @@ case $POWERLEVEL9K_MODE in TEST_ICON='' OK_ICON="\u2713" # ✓ FAIL_ICON="\u2718" # ✘ + SYMFONY_ICON="SF" VCS_UNTRACKED_ICON='?' VCS_UNSTAGED_ICON="\u25CF" # ● VCS_STAGED_ICON="\u271A" # ✚ @@ -115,6 +117,7 @@ case $POWERLEVEL9K_MODE in TEST_ICON="\uE891" # OK_ICON="\u2713" # ✓ FAIL_ICON="\u2718" # ✘ + SYMFONY_ICON="SF" VCS_UNTRACKED_ICON="\uE16C" # VCS_UNSTAGED_ICON="\uE17C" # VCS_STAGED_ICON="\uE168" # @@ -145,6 +148,7 @@ case $POWERLEVEL9K_MODE in TEST_ICON='' OK_ICON="\u2713" # ✓ FAIL_ICON="\u2718" # ✘ + SYMFONY_ICON="SF" VCS_UNTRACKED_ICON='?' VCS_UNSTAGED_ICON="\u25CF" # ● VCS_STAGED_ICON="\u271A" # ✚ @@ -221,7 +225,8 @@ zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f" zstyle ':vcs_info:*' stagedstr " %F{$VCS_FOREGROUND_COLOR}$VCS_STAGED_ICON%f" zstyle ':vcs_info:*' unstagedstr " %F{$VCS_FOREGROUND_COLOR}$VCS_UNSTAGED_ICON%f" -zstyle ':vcs_info:git*+set-message:*' hooks git-untracked git-aheadbehind git-stash git-remotebranch git-tagname +zstyle ':vcs_info:git*+set-message:*' hooks vcs-detect-changes git-untracked git-aheadbehind git-stash git-remotebranch git-tagname +zstyle ':vcs_info:hg*+set-message:*' hooks vcs-detect-changes # For Hg, only show the branch name zstyle ':vcs_info:hg*:*' branchformat "$VCS_BRANCH_ICON%b" @@ -510,6 +515,14 @@ prompt_symfony2_tests() { fi } +# Symfony2-Version +prompt_symfony2_version() { + if [[ -f app/bootstrap.php.cache ]]; then + local symfony2_version=$(grep " VERSION " app/bootstrap.php.cache | sed -e 's/[^.0-9]*//g') + $1_prompt_segment "$0" "240" "$DEFAULT_COLOR" "$SYMFONY_ICON $symfony2_version" + fi +} + # Show a ratio of tests vs code build_test_stats() { local code_amount="$3" @@ -575,13 +588,6 @@ build_right_prompt() { done } -prompt_powerlevel9k_precmd() { - vcs_info - - # Add a static hook to examine staged/unstaged changes. - vcs_info_hookadd set-message vcs-detect-changes -} - powerlevel9k_init() { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS @@ -593,7 +599,7 @@ powerlevel9k_init() { # initialize VCS autoload -Uz add-zsh-hook - add-zsh-hook precmd prompt_powerlevel9k_precmd + add-zsh-hook precmd vcs_info if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then PROMPT="╭─%{%f%b%k%}"'$(build_left_prompt)'" |