diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-04-05 00:24:36 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-04-05 00:24:36 +0300 |
commit | 49b8024947ecd2ed538878e94e1d0ed8f0420905 (patch) | |
tree | 86ebc25acc195e32132e92ac719d0f31b9558574 | |
parent | 13273fccd66709db62f93c772c9e052d398dac88 (diff) |
Show active mercurial bookmark.
-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 |