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.
--- 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() {