From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27658 invoked from network); 21 Jun 2001 08:35:01 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jun 2001 08:35:01 -0000 Received: (qmail 21751 invoked by alias); 21 Jun 2001 08:34:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15018 Received: (qmail 21712 invoked from network); 21 Jun 2001 08:34:17 -0000 From: "Bart Schaefer" Message-Id: <1010621083430.ZM1631@candle.brasslantern.com> Date: Thu, 21 Jun 2001 08:34:30 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: PATCH: compdef exit value MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Use of && rather than if-then was causing compdef to return a nonzero exit status in some cases when it should not have. The first two hunks are just stray whitespace. Index: Completion/compinit =================================================================== RCS file: /extra/cvsroot/zsh/zsh-4.0/Completion/compinit,v retrieving revision 1.3 diff -c -r1.3 compinit --- Completion/compinit 2001/05/30 15:57:36 1.3 +++ Completion/compinit 2001/06/21 08:30:52 @@ -221,7 +221,7 @@ echo "$0: I needs arguments" return 1 fi - + while getopts "anpPkKd" opt; do case "$opt" in a) autol=yes;; @@ -251,7 +251,7 @@ echo "$0: I needs arguments" return 1 fi - + if [[ -z "$delete" ]]; then # If the first word contains an equal sign, all words must contain one # and we define which services to use for the commands. @@ -360,7 +360,7 @@ fi if [[ -z "$new" || "${+_comps[$i]}" -eq 0 ]]; then _comps[$cmd]="$func" - [[ -n "$svc" ]] && _services[$cmd]="${i#*\=}" + if [[ -n "$svc" ]]; then _services[$cmd]="${i#*\=}"; fi fi done ;; -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net