Skip to content
Snippets Groups Projects
Commit b4e7e1f0 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

zsh_completion: complete merge tools for -t/--tool

Differential Revision: https://phab.mercurial-scm.org/D4362
parent 5f8282f3
No related branches found
No related tags found
No related merge requests found
......@@ -281,6 +281,18 @@
(( $#items )) && _describe -t config 'config item' items
}
_hg_internal_merge_tools=(
\\:dump \\:fail \\:forcedump \\:local \\:merge \\:merge-local \\:merge-other
\\:merge3 \\:other \\:prompt \\:tagmerge \\:union
)
_hg_merge_tools() {
typeset -a external_tools
_describe -t internal_tools 'internal merge tools' _hg_internal_merge_tools
external_tools=(${(f)"$(_hg_cmd showconfig merge-tools | cut -d . -f 2)"})
(( $#external_tools )) && _describe -t external_tools 'external merge tools' external_tools
}
_hg_addremove() {
_alternative 'files:unknown files:_hg_unknown' \
'files:missing files:_hg_missing'
......@@ -416,7 +428,7 @@
'--nodates[omit dates from diff headers]')
_hg_mergetool_opts=(
'(--tool -t)'{-t+,--tool=}'[specify merge tool]:merge tool'
'(--tool -t)'{-t+,--tool=}'[specify merge tool]:merge tool:_hg_merge_tools'
)
_hg_dryrun_opts=(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment