diff options
author | Ben Hilburn <bhilburn@gmail.com> | 2015-04-05 23:04:32 +0300 |
---|---|---|
committer | Ben Hilburn <bhilburn@gmail.com> | 2015-04-05 23:04:32 +0300 |
commit | fb7f0097697f4a78861f6e026bb0444f268c335a (patch) | |
tree | 126b6e4ce2ab380c5b056e395a0e39e2d493e1db /powerlevel9k.zsh-theme | |
parent | e427f7c0c9e196ae242b0c9ecfe8d6418b8dfe36 (diff) | |
parent | fddf341d5cee2f5d46a11443a90c57be42adede9 (diff) |
Merge pull request #21 from dritter/dritter/mercurial_show_bookmark
Mercurial: show bookmark in `vcs` segment.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 1662d58d..0acd44bc 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -104,6 +104,8 @@ zstyle ':vcs_info:git*+set-message:*' hooks git-untracked git-aheadbehind git-st zstyle ':vcs_info:hg*:*' branchformat "%b" # The `get-revision` function must be turned on for dirty-check to work for Hg zstyle ':vcs_info:hg*:*' get-revision true +zstyle ':vcs_info:hg*:*' get-bookmarks true +zstyle ':vcs_info:hg*+gen-hg-bookmark-string:*' hooks hg-bookmarks if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then zstyle ':vcs_info:*' get-revision true @@ -236,6 +238,18 @@ function +vi-git-stash() { fi } +function +vi-hg-bookmarks() { + if [[ -n "${hgbmarks[@]}" ]]; then + hook_com[hg-bookmark-string]=" ☿ ${hgbmarks[@]}" + + # And to signal, that we want to use the sting we just generated, + # set the special variable `ret' to something other than the default + # zero: + ret=1 + return 0 + fi +} + function +vi-vcs-detect-changes() { if [[ -n ${hook_com[staged]} ]] || [[ -n ${hook_com[unstaged]} ]]; then VCS_WORKDIR_DIRTY=true |