From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3614 invoked by alias); 7 Nov 2013 09:45:06 -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: 18114 Received: (qmail 24691 invoked from network); 7 Nov 2013 09:44:51 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7ef66d00000795a-9e-527b6110be22 Date: Thu, 07 Nov 2013 09:44:47 +0000 From: Peter Stephenson To: Zsh-Users List Subject: Re: Fish-like autosuggestions Message-id: <20131107094447.0302656e@pwslap01u.europe.root.pri> In-reply-to: References: <131030092555.ZM8077@torch.brasslantern.com> <131105075700.ZM18043@torch.brasslantern.com> <20131105161858.543037da@pwslap01u.europe.root.pri> <131105114640.ZM18224@torch.brasslantern.com> <131105124000.ZM18277@torch.brasslantern.com> <20131106200715.6e549a6e@pws-pc.ntlworld.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e/4FV2BxOoggzm7ZCx2nFzJ6MDoserg B6YAxigum5TUnMyy1CJ9uwSujC0tv9kLFvBUbLz2hrmB8Q1nFyMnh4SAicT6z9tYIWwxiQv3 1rN1MXJxCAksZZRYOr+JBSQB5DBJzFkX0cXIwcEioCrxYLkZSJhNwFBi6qbZjCC2iICaxOVH y8HKhYHs3xsOsYHYvAL2Epd3T2QGsTkFgiUm9U1ihJjfyiIx7/EasMX8AvoSV/9+YoI4wl5i 5pUzjBDNghI/Jt8DG8osoCWxeVsTK4QtL7F5zVvmCYwCs5CUzUJSNgtJ2QJG5lWMoqmlyQXF Sem5RnrFibnFpXnpesn5uZsYISH4dQfj0mNWhxgFOBiVeHhn1FQFCbEmlhVX5h5ilOBgVhLh bQ6pDhLiTUmsrEotyo8vKs1JLT7EyMTBKdXAmPV69Zeuxlf6zh/vSQqmKvbY9E/yvsya6Be0 nDndsv1el62P6HmVje/Oc9nXb1/J8momM4PxdLmFNximvuw+O+nSH1mlmksR95i75y56Ev5L 2+3nGcE3n29vvLGG08e7rYD/a8TVE2YHsqsZcuIs7l8On3zw7uTdj9Kk9raUd73/+txZms0s TYmlOCPRUIu5qDgRAPowhOQfAgAA On Wed, 06 Nov 2013 16:04:23 -0800 Bart Schaefer wrote: > You've already implemented your idea so perhaps this is moot, but to > explain my thought: The same widget could get invoked for all > descriptors as long as it has a way to tell which descriptor caused > the call. Hence my suggestion of putting the descriptor number in > $NUMERIC etc.; the single widget could just do "case $NUMERIC in ..." > or something (such as passing the FD as an argument, which appears to > be what you did). I can see that --- and it's probably entirely moot at this point --- but I think of it this way: you've set up a file descriptor for a particular purpose. Rather than edit an existing widget handling file descriptors for completely different purposes, which is a maintainance problem, you probably want to run a completely different chunk of code. In other words, what's needed is a bit more like binding a keystroke to a widget than running a fixed widget in a specific circumstance. The semantics of zle -F have that binding effect. Anyway, I think it's down to seeing if the change does the trick. By the way, note that using "zle -F" with an existing file descriptor silently overwrites the previous handler (another parallel with key binding), even if the mechanism has changed, which partially contradicts what I said before. I'll probalby commit this before 5.0.3 (not 4.0.3) since it shouldn't break anything existing and I should be able to confirm that as I use the old interface all the time. pws