From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8035 invoked by alias); 7 Nov 2013 00:04:40 -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: 18110 Received: (qmail 16211 invoked from network); 7 Nov 2013 00:04:26 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=KItnmP/LCRpr7o2fzM2TrXteSMS+yaqgjnLuyQskwaY=; b=UX48yw3z15Un54KPgIJ86Fj/KhyKj3GxZ+Td78sd9If0Q1soxk8LXMpyR3Lx/CYt2R dEHxQwQkzGCncVk7hzg+CUqX4Su6UqjIPmKYd3WlqHyDrxYs2yRneF6zlwS355mtuvyk E8+z1xZlXgeFknvEztYm6vm/l1X/CvWMcl733Clu/3TSqb5zWAPBdy9Qj7JiMEQdFTUi xzt6pXqPmAdqUpWE4u+APV5RzoZx0+H/ep9BN3ndebNpbV8vgZbEPrxKV+ekxBUTcTN6 1oipe4z0xI9MyDr2gwknV1uVqE+6ojqzy7848RMBE39V1NlZFRQPSd48kcFKdVywMYvG 0iXA== X-Gm-Message-State: ALoCoQm1gY4dlgwlTfOHAbkaecAKrDUYaoqf+oHCWbDkkpKKnX3IfpGHsxN6fMQtPmECKEgV0YJK MIME-Version: 1.0 X-Received: by 10.152.28.194 with SMTP id d2mr4195453lah.2.1383782663207; Wed, 06 Nov 2013 16:04:23 -0800 (PST) In-Reply-To: <20131106200715.6e549a6e@pws-pc.ntlworld.com> 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> Date: Wed, 6 Nov 2013 16:04:23 -0800 Message-ID: Subject: Re: Fish-like autosuggestions From: Bart Schaefer To: Zsh-Users List Content-Type: text/plain; charset=ISO-8859-1 On Wed, Nov 6, 2013 at 12:07 PM, Peter Stephenson wrote: > On Tue, 05 Nov 2013 12:40:00 -0800 > Bart Schaefer wrote: >> On Nov 5, 11:46am, Bart Schaefer wrote: >> } >> } Hmm, the doc doesn't actually explain what the return value from a -F >> } handler means to the surrounding code. > > It doesn't mean anything: it doesn't make sense for a function > listening for one file descriptor to cause aborting of a function or > widget associated with a different descriptor. OK, I only asked because the examples seem to have different return values for success/failure, and I wanted to be sure that wasn't more than a programming habit. > You'll have to associate a widget with a file descriptor, so it'll need > to have a specific name [... and] > can't just use a generic widget because we don't know what file > descriptors we're listening on. 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).