diff contrib/zsh_completion @ 3559:35b99f076d02

zsh: suppress mq completion error messages outside of repository
author Brendan Cully <brendan@kublai.com>
date Thu, 26 Oct 2006 17:33:24 -0700
parents 733835602365
children 6106236bc4eb
line wrap: on
line diff
--- a/contrib/zsh_completion	Thu Oct 26 17:28:12 2006 -0700
+++ b/contrib/zsh_completion	Thu Oct 26 17:33:24 2006 -0700
@@ -504,13 +504,13 @@
 # MQ
 _hg_qseries() {
   typeset -a patches
-  patches=($(_hg_cmd qseries))
+  patches=($(_hg_cmd qseries 2>/dev/null))
   (( $#patches )) && _describe -t hg-patches 'patches' patches
 }
 
 _hg_qapplied() {
   typeset -a patches
-  patches=($(_hg_cmd qapplied))
+  patches=($(_hg_cmd qapplied 2>/dev/null))
   if (( $#patches ))
   then
     patches+=(qbase qtip)
@@ -520,7 +520,7 @@
 
 _hg_qunapplied() {
   typeset -a patches
-  patches=($(_hg_cmd qunapplied))
+  patches=($(_hg_cmd qunapplied 2>/dev/null))
   (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches
 }
 
@@ -528,7 +528,7 @@
   typeset -a guards
   local guard
   compset -P "+|-"
-  _hg_cmd qselect -s | while read guard
+  _hg_cmd qselect -s 2>/dev/null | while read guard
   do
     guards+=(${guard#(+|-)})
   done