Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Qmail-Scanner-Diagnostics: from mail-pf0-f171.google.com by f.primenet.com.au (envelope-from <schaefer@brasslantern.com>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(209.85.192.171):SA:0(0.0/5.0):. 
 Processed in 0.113991 secs); 14 Jul 2016 07:45:00 -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.0 required=5.0 tests=T_DKIM_INVALID
	autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: schaefer@brasslantern.com
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=brasslantern-com.20150623.gappssmtp.com; s=20150623;
        h=from:message-id:date:in-reply-to:comments:references:to:subject
         :mime-version;
        bh=dCJnG+0CGv+dCjxg097Yq4rMMN9WdmXEEEJwszVzwqk=;
        b=YzVj8gUanlVd5jrNSLAPLTytfhg8g7/9GaC2q/xDit1hqyvHE7CGNov+izul9/Q7Rz
         5MKNAT/xiLBPmwaJ3MLsKzcZwp5hqOdBgCKgpBrUJAyGeNkQZ+rqp5lhJi/slNHyNYxt
         inBvUe+HJeJW2wjQTJXCXjbqNQeiQemmLAogzh6C2HCanxFBWzX2Curse6XlJpt/4Pvn
         Vc2Q3juPFyzJdp9T+yEs2e9D3hrFc2X4Gj0Y2KU4Mc7ZpdDhoFxaodSQQhYAbL6hSi4D
         4Owt/j2UtsDnL/TuBQj5Dkaf7NBdeP8OFMcr89urNpPLO45vxWIhAq5I9ivivu7MqygM
         gTjw==
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;
        bh=dCJnG+0CGv+dCjxg097Yq4rMMN9WdmXEEEJwszVzwqk=;
        b=TLJFaQDRFslVLevCo7LN4S6eZPSStGMOmPj4YQHLgAhRS1BNIAr67bTDpYwF2XDJu6
         he3EQm/8MM/FQjUoQJC5aLFIk15lSPM2wtLmlMjjbD1Or0+7d++zIqbXVMC24pWCCx4R
         WSWOAY21xgm2L9PPyMRNaUY2vsJpbxIm47oKOyk03A/6ECLla1XlibPG9YZKYQSHi1W1
         m+OPY/xz6xpEjfOc85ApKV1SlkBYQyewqwkAErDz2bnNleL5gWM+CeL3pkYG8EUKngrQ
         N1TYhAvNXkH1P2zNyH2hprf3a05UNruDXYtwrWregod33tSJdMYTOFMxhU0t+IioUI0/
         MznA==
X-Gm-Message-State: ALyK8tIi+Bl14QH2HM3xX1k4HoW6DuISPWrSJPfxDq4jlcfpVQdflXAH4VOkTnToZxyKmQ==
X-Received: by 10.98.37.71 with SMTP id l68mr10512464pfl.38.1468482295634;
        Thu, 14 Jul 2016 00:44:55 -0700 (PDT)
From: Bart Schaefer <schaefer@brasslantern.com>
Message-Id: <160714004519.ZM23514@torch.brasslantern.com>
Date: Thu, 14 Jul 2016 00:45:19 -0700
In-Reply-To: <20160705045757.GD11492@tarsus.local2>
Comments: In reply to Daniel Shahaf <d.s@daniel.shahaf.name>
        "Re: [PATCH] add-zle-hook-widget" (Jul  5,  4:57am)
References: <160612184453.ZM11316@torch.brasslantern.com> 
	<20160613085219.GA23148@tarsus.local2> 
	<160614111054.ZM17893@torch.brasslantern.com> 
	<20160615232447.GA29225@tarsus.local2> 
	<160616222055.ZM27034@torch.brasslantern.com> 
	<20160621014130.GA17100@tarsus.local2> 
	<160701131158.ZM9615@torch.brasslantern.com> 
	<20160705045757.GD11492@tarsus.local2>
X-Mailer: OpenZMail Classic (0.9.2 24April2005)
To: zsh-workers@zsh.org
Subject: Re: [PATCH] add-zle-hook-widget
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Seq: zsh-workers 38854

On Jul 5,  4:57am, Daniel Shahaf wrote:
}
} Note there are alternatives to specifying detailed partial orders: for
} example, one could hook a single function that invokes a few other ones

This gives me an interesting idea:  The list of hook types is stored
in a zstyle.  So you could theoretically add your own new hook types
to that style, and hey presto, add-zle-hook-widget will let you manage
a hook "array" for your new hook name.

    azhw:zle-new-hook-name() { ... }
    zle -N zle-new-hook-name azhw:zle-new-hook-name
    $(zstyle -L zle-hook types) new-hook-name

    add-zle-hook-widget new-hook-name some-other-widget
    add-zle-hook-widget new-hook-name yet-another-widget

Then you can add all of your hooks to one of the built-in hooks like

    add-zle-hook-widget line-init zle-new-hook-name

Hmm.

