From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16567 invoked by alias); 9 Jan 2017 01:38:52 -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: 40313 Received: (qmail 11762 invoked from network); 9 Jan 2017 01:38:52 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com 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(66.111.4.25):SA:0(-0.7/5.0):. Processed in 2.026546 secs); 09 Jan 2017 01:38:52 -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=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=ws3JaqzUrTSP/rA bG6d1AmwOUxA=; b=he7Sr4P3756Mo4KdSKBDGFglF4ffeBME82BwgScOSNZuj/k GmLz3Qvl+dmgD21HdoadbtStKkpOITOkBfZYYb3SHWS2rSisRO83oYVSHgshZsud vHoLSICMMu461wZ1/NnhevbdFiyTuNuoeV1z0tpBWMnthpUPcSUC+WOEmOBQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ws3JaqzUrTSP/r AbG6d1AmwOUxA=; b=RcVWLS+/BTOZqLHb9EPm1OennGrhGYO+x2RLQhr1Tcfoth Qs6xH6j2jjdFxo441lnTugf4bqfOeIJEwzllo/a4PnbKvoX4QxetLtTsi22Aw5zn Dfhqc0dUyIqc/t6cKsa/FSYsNkzqkVdWhjLqqD7qy3byWkn0r8M5xYCd9Iog4= X-ME-Sender: X-Sasl-enc: V+bOq+OhSaICx2AX8dPYRWejUjYxn+m+FgLov1stlyO7 1483925924 Date: Mon, 9 Jan 2017 01:35:26 +0000 From: Daniel Shahaf To: m0viefreak Cc: zsh-workers@zsh.org Subject: Re: [PATCH] isearch: do not use PAT_STATIC since we call zle hooks Message-ID: <20170109013526.GA25236@fujitsu.shahaf.local2> References: <20170106172541.GA14113@fujitsu.shahaf.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170106172541.GA14113@fujitsu.shahaf.local2> User-Agent: Mutt/1.5.23 (2014-03-12) m0viefreak wrote on Fri, Jan 06, 2017 at 17:25:41 +0000: > Minimal reproducing example: > > % bindkey '^R' history-incremental-pattern-search-backward > % evil_hook() { a=(); : ${a[(r)foo*]}; }; > % zle -N zle-isearch-update evil_hook > % : foo > % : bar > % : baz > % > > type: <^R>b > % : baz > bck-i-search: b_ > > type: <^R> > % : foo > bck-i-search: b_ > > ': foo' is found instead of ': bar' because evil_hook modified the > static pattern used in isearch. > > Related: zsh-syntax-highlighting issue which found this bug: > https://github.com/zsh-users/zsh-syntax-highlighting/issues/407 Is there a way to probe for this bug at runtime? I.e., a way for a script to determine whether the zsh binary that interprets it has or hasn't this bug? We need this in z-sy-h to choose between two codepaths (and we'd rather not use is-at-least in case distros backport m0vie's patch). Thanks, Daniel