From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23636 invoked by alias); 6 Jun 2012 14:45:38 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17134 Received: (qmail 5421 invoked from network); 6 Jun 2012 14:45:36 -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 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120606074509.ZM6697@torch.brasslantern.com> Date: Wed, 06 Jun 2012 07:45:09 -0700 In-reply-to: <4FCF153E.9040405@necoro.eu> Comments: In reply to ( Text in unknown character set ISO-8859-15 not shown ) ""Bug" in promptnl" (Jun 6, 10:30am) References: <4FCF153E.9040405@necoro.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: "Bug" in promptnl MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable On Jun 6, 10:30am, Ren=E9 wrote: } Subject: "Bug" in promptnl } } promptnl:65: bad math expression: operand expected at `> 1 ' }=20 } The message is no real problem but just confusing :). Is there an easy } way to fix it? Probably just checking that {${RECV#*\;}%R} does not } evaluate to the empty string, isn't it? Wow, 11 years without anyone noticing this? Index: Functions/Misc/promptnl =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D diff -u -r1.1.1.1 promptnl --- Functions/Misc/promptnl 9 Apr 2001 20:14:11 -0000 1.1.1.1 +++ Functions/Misc/promptnl 6 Jun 2012 14:34:18 -0000 @@ -62,7 +62,7 @@ =20 # If the cursor is not in the first column, emit EOLMARK and newline. =20=20=20 -(( ${${RECV#*\;}%R} > 1 )) && print -P -- $EOLMARK +(( ${${${RECV#*\;}%R}:-0} > 1 )) && print -P -- $EOLMARK =20=20=20=20 return 0