changeset 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 080612b80c95
children 0701044ad156
files contrib/zsh_completion
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/zsh_completion	Tue Jun 30 23:40:03 2009 +0200
+++ b/contrib/zsh_completion	Tue Jun 30 17:58:17 2009 -0400
@@ -364,7 +364,8 @@
   '--remotecmd[specify hg command to run on the remote side]:')
 
 _hg_cmd() {
-  _call_program hg hg "$_hg_cmd_globals[@]" "$@"
+  _call_program hg hg --config ui.verbose=0 --config defaults."$1"= \
+    "$_hg_cmd_globals[@]" "$@"
 }
 
 _hg_cmd_add() {