From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22271 invoked by alias); 9 Oct 2014 16:14:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 33403 Received: (qmail 29892 invoked from network); 9 Oct 2014 16:13:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <141009091347.ZM27600@torch.brasslantern.com> Date: Thu, 09 Oct 2014 09:13:47 -0700 In-reply-to: Comments: In reply to Bernard Cafarelli "cvs completion problem in zsh-5.0.7" (Oct 9, 3:07pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Bernard Cafarelli , zsh-workers@zsh.org Subject: Re: cvs completion problem in zsh-5.0.7 MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 9, 3:07pm, Bernard Cafarelli wrote: } } % cvs add new } unknown cvs command: add } } I ran a git bisect and ended up with 5a2668a6ac1c: } 33223: discard stderr except when _complete_debug is in progress. Well, dammit. The assumption was that 2>&1 would have been passed down to _call_program for the "eval" that it executes. In actual practice in several cases it's the call to _call_program ITSELF that has 2>&1 attached. diff --git a/Completion/Base/Utility/_call_program b/Completion/Base/Utility/_call_program index b657648..010e094 100644 --- a/Completion/Base/Utility/_call_program +++ b/Completion/Base/Utility/_call_program @@ -2,8 +2,8 @@ local tmp err_fd=-1 -if (( ${debug_fd:--1} > 2 )) -then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is log file +if (( ${debug_fd:--1} > 2 )) || [[ ! -t 2 ]] +then exec {err_fd}>&2 # debug_fd is saved stderr, 2 is trace or redirect else exec {err_fd}>/dev/null fi -- Barton E. Schaefer