diff options
Diffstat (limited to 'Completion/Zsh/Command/_zstyle')
-rw-r--r-- | Completion/Zsh/Command/_zstyle | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle index eb27117b2..9a6d61891 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 @@ -122,6 +125,7 @@ styles=( select-prompt c: select-scroll c: separate-sections c:bool + show-ambiguity c: show-completer c:bool single-ignored c:single-ignored sort c:bool @@ -176,7 +180,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 +197,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 @@ -307,7 +323,7 @@ while (( $#state )); do (cmdorcont) _alternative -O suf \ - 'commands:command:_command ' \ + 'commands:command:_path_commands' \ 'contexts:context:(-array-value- -brace-parameter- -command- -condition- -math- -parameter- -redirect- -subscript- -value-)' ;; @@ -549,7 +565,18 @@ while (( $#state )); do compset -P '*%' _values -s '' 'format replacement' \ 'b[the current branch]' \ - 'r[current revision number]' \ + 'r[current revision number]' + else + _message -e formats 'vcs format' + 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 @@ -566,6 +593,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 ;; |