From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22925 invoked by alias); 12 Feb 2018 09:11:48 -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: List-Unsubscribe: X-Seq: 42358 Received: (qmail 2325 invoked by uid 1010); 12 Feb 2018 09:11:48 -0000 X-Qmail-Scanner-Diagnostics: from hahler.de by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(188.40.33.212):SA:0(-1.9/5.0):. Processed in 8.096793 secs); 12 Feb 2018 09:11:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: genml+zsh-workers@thequod.de X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=thequod.de; h= content-type:content-type:mime-version:user-agent:date:date :message-id:subject:subject:from:from:received:received; s= postfix2; t=1518426316; bh=1I0lMjesjAIHl8C1CyN7YMziP7M4zgNBEwkbX aqSeXk=; b=WIUbCAlsiqUtWuQ7wUuJ7FA0nAt/Ij3oqw+8Xgr51ClydNSedmaxW vhhIv2xbUUI3DYsnniAdnUcH48wGqcL2VozvC7iyLMh8/TwfnHNC8orntYK6pLg+ WqTkoECepCvvioJVVqldqbMkx0m1eUNa5q8gH7zKjx1jx1UY98UEV8= To: Zsh Hackers' List From: Daniel Hahler Subject: [BUG] REPORTTIME parsed as 0 with error in zle widget Message-ID: <6de993f2-b9ab-19ba-fa2c-417377a4e6f8@thequod.de> Date: Mon, 12 Feb 2018 10:05:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rS0EVSfGwKdtSZdCOOys4JH6kumOfhpVZ" --rS0EVSfGwKdtSZdCOOys4JH6kumOfhpVZ Content-Type: multipart/mixed; boundary="TzRkCfDVOkjylnedtvjkX47qokOuakZD2"; protected-headers="v1" From: Daniel Hahler To: Zsh Hackers' List Message-ID: <6de993f2-b9ab-19ba-fa2c-417377a4e6f8@thequod.de> Subject: [BUG] REPORTTIME parsed as 0 with error in zle widget --TzRkCfDVOkjylnedtvjkX47qokOuakZD2 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Given the following zle widget: __fsel() { exit 130 | while read item; do : done } mywidget() { LBUFFER=3D"${LBUFFER}$(__fsel)" } zle -N mywidget bindkey '^r' mywidget TEST CASE: 1. source it 2. set REPORTTIME=3D5 3. run it (ctrl-r) RESULT: time gets reported, but should not getintvalue in should_report_time returns 0, although getstrvalue(v) is "= 5"! This is caused by errflag being set in matheval, which makes it return 0!= And this gets caused by "exit 130" in __fsel. I've noticed this with fzf and its widgets, where 130 is returned when se= lecting nothing. btw: for fzf it makes sense to unset REPORTTIME like it has been done rec= ently for completion functions already. Cheers, Daniel. --TzRkCfDVOkjylnedtvjkX47qokOuakZD2-- --rS0EVSfGwKdtSZdCOOys4JH6kumOfhpVZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQS1psIggp+uXWnrnKN8Ar+FP+Y+AAUCWoFYygAKCRB8Ar+FP+Y+ ANqZAKCABIdjqj4QRsjQllt30QDTBOFxBgCdH552LOCpdLyfhjgC70bDGWeGuTI= =5qhO -----END PGP SIGNATURE----- --rS0EVSfGwKdtSZdCOOys4JH6kumOfhpVZ--