diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-03-24 20:05:48 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-03-24 20:05:48 +0300 |
commit | 43b984494d8d0314934b0346a57311cc4bc5e785 (patch) | |
tree | dd10435e617c504dfbe48b6a47d927f4f5307781 /powerlevel9k.zsh-theme | |
parent | 0710cc7221cef20b73eeb75c6b3f2043ff56d019 (diff) |
print HEAD instead of commit if not available; do not call zle when illegal to do so
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 8d00f448..48c393b7 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1734,7 +1734,7 @@ function _p9k_vcs_render() { local ws if [[ $POWERLEVEL9K_SHOW_CHANGESET == true || -z $VCS_STATUS_LOCAL_BRANCH ]]; then _p9k_get_icon VCS_COMMIT_ICON - _$0_fmt COMMIT "$_P9K_RETVAL${VCS_STATUS_COMMIT:0:$POWERLEVEL9K_VCS_INTERNAL_HASH_LENGTH}" + _$0_fmt COMMIT "$_P9K_RETVAL${${VCS_STATUS_COMMIT:0:$POWERLEVEL9K_VCS_INTERNAL_HASH_LENGTH}:-HEAD}" ws=' ' fi @@ -2095,7 +2095,7 @@ function _p9k_update_prompt() { _P9K_REFRESH_REASON=$1 _p9k_set_prompt _P9K_REFRESH_REASON='' - zle .reset-prompt + zle && zle .reset-prompt } set_default POWERLEVEL9K_PROMPT_ADD_NEWLINE false @@ -2118,7 +2118,7 @@ powerlevel9k_prepare_prompts() { } function _p9k_zle_keymap_select() { - zle .reset-prompt + zle && zle .reset-prompt } set_default POWERLEVEL9K_IGNORE_TERM_COLORS false @@ -2153,7 +2153,7 @@ _p9k_init_timer() { emulate -L zsh local dummy while IFS='' read -t -u $_P9K_TIMER_FD dummy; do true; done - zle .reset-prompt + zle && zle .reset-prompt } zle -F $_P9K_TIMER_FD _p9k_on_timer |