##// END OF EJS Templates
zsh: tab-complete status results by directory...
Brendan Cully -
r3587:c8494fcc default
parent child Browse files
Show More
@@ -140,13 +140,19 b' typeset -A _hg_cmd_globals'
140 _hg_unknown() {
140 _hg_unknown() {
141 typeset -a status_files
141 typeset -a status_files
142 _hg_status u
142 _hg_status u
143 (( $#status_files )) && _describe -t files 'unknown files' status_files
143 _wanted files expl 'unknown files' _multi_parts / status_files
144 }
144 }
145
145
146 _hg_missing() {
146 _hg_missing() {
147 typeset -a status_files
147 typeset -a status_files
148 _hg_status d
148 _hg_status d
149 (( $#status_files )) && _describe -t files 'missing files' status_files
149 _wanted files expl 'missing files' _multi_parts / status_files
150 }
151
152 _hg_modified() {
153 typeset -a status_files
154 _hg_status m
155 _wanted files expl 'modified files' _multi_parts / status_files
150 }
156 }
151
157
152 _hg_addremove() {
158 _hg_addremove() {
@@ -303,13 +309,24 b' typeset -A _hg_cmd_globals'
303 }
309 }
304
310
305 _hg_cmd_diff() {
311 _hg_cmd_diff() {
312 typeset -A opt_args
306 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
313 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
307 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
314 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
308 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
315 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
309 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \
316 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \
310 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \
317 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \
311 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \
318 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \
312 '*:file:_files -W $(_hg_cmd root)'
319 '*:file:->diff_files'
320
321 if [[ $state == 'diff_files' ]]
322 then
323 if [[ -n $opt_args[-r] ]]
324 then
325 _files -W $(_hg_cmd root)
326 else
327 _hg_modified
328 fi
329 fi
313 }
330 }
314
331
315 _hg_cmd_export() {
332 _hg_cmd_export() {
@@ -448,7 +465,19 b' typeset -A _hg_cmd_globals'
448 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
465 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
449 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \
466 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_tags' \
450 '--no-backup[do not save backup copies of files]' \
467 '--no-backup[do not save backup copies of files]' \
451 '*:file:_files -W $(_hg_cmd root)'
468 '*:file:->diff_files'
469
470 if [[ $state == 'diff_files' ]]
471 then
472 if [[ -n $opt_args[-r] ]]
473 then
474 _files -W $(_hg_cmd root)
475 else
476 typeset -a status_files
477 _hg_status mard
478 _wanted files expl 'modified, added, removed or deleted file' _multi_parts / status_files
479 fi
480 fi
452 }
481 }
453
482
454 _hg_cmd_serve() {
483 _hg_cmd_serve() {
General Comments 0
You need to be logged in to leave comments. Login now