zsh_completion: complete hg files
authorAnton Shestakov <av6@dwimlabs.net>
Tue, 21 Aug 2018 21:05:01 +0800
changeset 39347 ad1c6bd3c676
parent 39346 d0dfdf263a20
child 39348 cde75233c415
zsh_completion: complete hg files Differential Revision: https://phab.mercurial-scm.org/D4361
contrib/zsh_completion
--- a/contrib/zsh_completion	Tue Aug 21 14:49:02 2018 +0800
+++ b/contrib/zsh_completion	Tue Aug 21 21:05:01 2018 +0800
@@ -631,6 +631,13 @@
   '*:revision:_hg_labels'
 }
 
+_hg_cmd_files() {
+  _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_subrepos_opts \
+  '(--rev -r)'{-r+,--rev=}'[search the repository as it is in REV]:revision:_hg_labels' \
+  '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
+  '*:file:_hg_files'
+}
+
 _hg_cmd_forget() {
   _arguments -s -S : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
   '(--interactive -i)'{-i,--interactive}'[use interactive mode]' \