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

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Wed Aug 29 14:33:28 EDT 2018


spectral accepted this revision.
spectral added inline comments.

INLINE COMMENTS

> zsh_completion:292
> +  _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

I'm slightly concerned this might give a false impression of what's available, listing things that I don't have installed, but I think this might be the best we can do at the moment - there doesn't appear to be a way to convince filemerge.py's _picktool to dump a list of them.

> zsh_completion:292
> +  _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

Do we need to uniquify this, or is zsh smart enough to do so?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4362

To: av6, #hg-reviewers, spectral
Cc: spectral, mercurial-devel


More information about the Mercurial-devel mailing list