diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-01-24 05:39:01 +0000 |
---|---|---|
committer | Frank Terbeck <ft@bewatermyfriend.org> | 2015-01-25 01:42:06 +0100 |
commit | 20953f53f083a72ce30ad39baa4e78c9402e45aa (patch) | |
tree | d5e8307c282d2817d2fb05ee7548ebf45d8f2fe5 /Completion/Zsh/Command/_zstyle | |
parent | 54bfcf5af18fbb841118e51b6c5325872770b52b (diff) | |
download | zsh-20953f53f083a72ce30ad39baa4e78c9402e45aa.tar.gz zsh-20953f53f083a72ce30ad39baa4e78c9402e45aa.tar.xz zsh-20953f53f083a72ce30ad39baa4e78c9402e45aa.zip |
_zstyle vcs_info completion: Add missing styles
Diffstat (limited to 'Completion/Zsh/Command/_zstyle')
-rw-r--r-- | Completion/Zsh/Command/_zstyle | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle index c8e1c2be8..2ebae7132 100644 --- a/Completion/Zsh/Command/_zstyle +++ b/Completion/Zsh/Command/_zstyle @@ -20,6 +20,9 @@ _completers() { compadd "$@" "$disp[@]" - "$us${^list[@]}" } +_vcs_info_hooks() { + compadd - ${functions[(I)+vi-*]#+vi-} +} # Assoc array of styles; the values give the possible top-level # contexts: # c completion @@ -176,7 +179,10 @@ styles=( actionformats v:vcs-format branchformat v:branch-format nvcsformats v: + hgrevformat v:hgrev-format stgitformat v:stg-format + patch-format v:patch-format + nopatch-format v:patch-format max-exports v: enable v:vcs disable v:vcs @@ -190,7 +196,16 @@ styles=( use-server v:bool use-simple v:bool get-revision v:bool + get-mq v:bool + get-bookmarks v:bool + get-unapplied v:bool + debug v:bool + hooks v:_vcs_info_hooks use-prompt-escapes v:bool + use-quilt v:bool + quilt-standalone v:bool + quilt-patch-dir v:_directories + quiltcommand v:_command_names chpwd z:bool progress z:progress @@ -555,6 +570,17 @@ while (( $#state )); do fi ;; + (hgrev-format) + if [[ $PREFIX = *% ]]; then + compset -P '*%' + _values -s '' 'format replacement' \ + 'h[current revision hash (global)]' \ + 'r[current revision number (local)]' + else + _message -e formats 'vcs format' + fi + ;; + (stg-format) if [[ $PREFIX = *% ]]; then compset -P '*%' @@ -566,6 +592,22 @@ while (( $#state )); do fi ;; + (patch-format) + if [[ $PREFIX = *% ]]; then + compset -P '*%' + _values -s '' 'format replacement' \ + 'p[name of top-most patch (applied-string)]' \ + 'u[number of unapplied patches (unapplied-string)]' \ + 'n[number of applied patches]' \ + 'c[number of unapplied patches.]' \ + 'a[number of all patches]' \ + 'g[names of active mq guards (hg backend)]' \ + 'G[number of active mq guards (hg backend)]' + else + _message -e formats 'vcs format' + fi + ;; + (_*) ${=state[1]} $suf ;; |