Mercurial > hg
comparison contrib/zsh_completion @ 8982:9c0cecb71350
zsh completion: disable defaults and verbose output when completing
If ui.verbose is set to True in hgrc, commands used to provide completions
would yield bad results. For example, qpush completion would include the
patch numbers and statuses as returned by qunapplied -v, instead of just
the patch names.
Defaults are also disabled when completing to prevent similar issues when
an option is set that changes a command's output.
author | Brodie Rao <me+hg@dackz.net> |
---|---|
date | Tue, 30 Jun 2009 17:58:17 -0400 |
parents | 6d5dca8737b9 |
children | 0701044ad156 |
comparison
equal
deleted
inserted
replaced
8981:080612b80c95 | 8982:9c0cecb71350 |
---|---|
362 _hg_remote_opts=( | 362 _hg_remote_opts=( |
363 '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:' | 363 '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:' |
364 '--remotecmd[specify hg command to run on the remote side]:') | 364 '--remotecmd[specify hg command to run on the remote side]:') |
365 | 365 |
366 _hg_cmd() { | 366 _hg_cmd() { |
367 _call_program hg hg "$_hg_cmd_globals[@]" "$@" | 367 _call_program hg hg --config ui.verbose=0 --config defaults."$1"= \ |
368 "$_hg_cmd_globals[@]" "$@" | |
368 } | 369 } |
369 | 370 |
370 _hg_cmd_add() { | 371 _hg_cmd_add() { |
371 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ | 372 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \ |
372 '*:unknown files:_hg_unknown' | 373 '*:unknown files:_hg_unknown' |