From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28267 invoked by alias); 28 May 2015 22:30:22 -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: 20235 Received: (qmail 2015 invoked from network); 28 May 2015 22:30:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=grLRaf2zdj+bjdnp52xOcxLNopo3cZS2BgQNbRDHx+I=; b=QPa6D1P4mSdk8N7p10kbG1TIYaWz5JA14U2kuCJ0h+6ColxDYBLFAszDja2jSbx6iQ CENl0/vpicWMvyOcJveyVJQzwasbDLnIhFQd1QWEkZdtBXufNeVtwecffm0THPlOTTt/ bD+YjGbPOyzs04l9JLmNS4CazjTqUA3WgX+yCwlWfXFir8AfDug9/0bpZ/HQynn3Z+uC ajk8eLn2teIou4KEgKa4K11D+fLWc91RzIvSzKTZLiLuP1/2a1j9z0ugK9ROlF5XFxi8 EwHCyIvif9FlqnzLiIYRL/0g+9Lz3j4rxMLbvU9loUrrtlZXpujo0lI72HDtjbR5cpgR F2Vw== X-Gm-Message-State: ALoCoQni6TJTGUKY/Iz7tp9YhokamPWlA65HhLh79N4a9SADSODGoT1dXJydiALvNkp4SdD2K2bI X-Received: by 10.202.108.132 with SMTP id h126mr4224151oic.5.1432852217766; Thu, 28 May 2015 15:30:17 -0700 (PDT) From: Bart Schaefer Message-Id: <150528153015.ZM11683@torch.brasslantern.com> Date: Thu, 28 May 2015 15:30:15 -0700 In-Reply-To: <55677AF5.50709@thequod.de> Comments: In reply to Daniel Hahler "Re: bracketed paste mode in xterm and urxvt" (May 28, 10:30pm) References: <55677AF5.50709@thequod.de> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: bracketed paste mode in xterm and urxvt MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 28, 10:30pm, Daniel Hahler wrote: } } I've stumbled upon it recently, too, and noticed that the handling of } zle-line-init and zle-line-finish should be improved to not overwrite } an already defined function. } } I am using the following pattern to add additional code to these hooks: } } eval "zle-line-init() { something_new; $functions[zle-line-init]; }" } eval "zle-line-finish() { something_new; $functions[zle-line-finish]; }" } } Does this make sense? Mostly; in some obscure cases (e.g., zle-line-init is an autoload and has not yet been loaded) it could break. } Would this be something that add-zsh-hook could provide? Possibly, though it would require its own separate conditional branch because zle-line-init is not the same flavor of "hook" as everything else. One way to do this is something like so: zle-line-init() { local w for w in "${(@ok)widgets%zle-line-init-*}" do zle $w "$@" done } Then you just create widgets named zle-line-init-N where N represents the order you want them to execute. Similarly for zle-line-finish.