From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16058 invoked by alias); 1 Mar 2014 21:03:37 -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: 32453 Received: (qmail 23347 invoked from network); 1 Mar 2014 21:03:31 -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 X-Originating-IP: [86.6.157.246] X-Spam: 0 X-Authority: v=2.1 cv=Z/xiHRhA c=1 sm=1 tr=0 a=BvYiZ/UW0Fmn8Wufq9dPrg==:117 a=BvYiZ/UW0Fmn8Wufq9dPrg==:17 a=NLZqzBF-AAAA:8 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=-BsVT5hO2pTXJHqDqBQA:9 a=CjuIK1q_8ugA:10 a=_dQi-Dcv4p4A:10 Date: Sat, 1 Mar 2014 21:03:27 +0000 From: Peter Stephenson To: Zsh Hackers' List Subject: PATCH: zcalc default base Message-ID: <20140301210327.3e27cabd@pws-pc.ntlworld.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I messed up zcalc's ability to set a default base when I modified it for the [#_] syntax. I think this is the right fix. diff --git a/Functions/Misc/zcalc b/Functions/Misc/zcalc index 6a56d47..b796446 100644 --- a/Functions/Misc/zcalc +++ b/Functions/Misc/zcalc @@ -197,7 +197,7 @@ while (( expression_mode )) || # Set default base if `[#16]' or `[##16]' etc. on its own. # Unset it if `[#]' or `[##]'. if [[ $line = (#b)[[:blank:]]#('[#'(\#|)((<->|)(|_|_<->))']')[[:blank:]]#(*) ]]; then - if [[ -z $match[4] ]]; then + if [[ -z $match[6] ]]; then if [[ -z $match[3] ]]; then defbase= else -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/