From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18325 invoked by alias); 5 Oct 2015 22:49:59 -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: 36795 Received: (qmail 27970 invoked from network); 5 Oct 2015 22:49:59 -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=-1.9 required=5.0 tests=BAYES_00 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=txLFibSt94IBwsnl02QT2lf6nJKZzNIe1agl+Ck8fHU=; b=EvoefV2In6Pt0eDreiSqk2Jfivhry+QtFarfxRhbpQaABlqDEjB31t6sW3Wej8I2SS 7Ds6eXbbrxJosVdR7jWR2YxizSRzfKbYYVpO+PqzfqJ1Equp0IUPQfF6P1rVVYm6u43t jBekWOsMuvo/EezUIlyF6VVClBbFtv1X6RRVqg9FtipocB1Bv3xNVulXCh217xZ5m/9u ojfTw3ojNbSJCleKwYzlD3PRMf9R4v0r1h1bo786RuZfp/hUXBnW51qla4Fal54Dqhy9 y1Pg6btQxD/V/lcdmcMgkZGqnvoST/zSZfj3kNf4Rry8LywXxvi6s1+gq6yvA0kJGYZs eEXA== X-Gm-Message-State: ALoCoQkSf7nuX9W4fFWadkRq/2WwrIe4EbqQyHc+jGxPgPyGJ8NW4EgKe68YPDcb2R66ousVLuH6 X-Received: by 10.60.37.106 with SMTP id x10mr18270261oej.69.1444085397078; Mon, 05 Oct 2015 15:49:57 -0700 (PDT) From: Bart Schaefer Message-Id: <151005154955.ZM4587@torch.brasslantern.com> Date: Mon, 5 Oct 2015 15:49:55 -0700 In-Reply-To: <20151005223302.GD2367@tarsus.local2> Comments: In reply to Daniel Shahaf "Re: [PATCH] Add API wrapper to ${+_comps[...]}" (Oct 5, 10:33pm) References: <20150930182948.GD2003@tarsus.local2> <151003174919.ZM31542@torch.brasslantern.com> <20151005215134.GA1959@tarsus.local2> <151005151148.ZM4523@torch.brasslantern.com> <20151005223302.GD2367@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: [PATCH] Add API wrapper to ${+_comps[...]} MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 5, 10:33pm, Daniel Shahaf wrote: } } How would I handle a case such as 36725 (three patches to a single } module)? I'd have sent three separate messages, if they couldn't all be treated as part of the same logical change. } The difference between } } f() { } [[ $# == 1 ]] || return 2 } (( $+_comps[$1] )) } } } and } g() { } [[ $# == 1 ]] || return 2 } (( $+_comps[$1] )) && (( $+functions[$_comps[$1]] )) } } } } is how they handle the case 'compdef _foo foo' with _foo() not having } being defined yet (nor marked for autoload). Is this a common case? } When does it happen? Presently it doesn't EVER happen (except maybe in your startup files). Which is why a function for (( $+_comps[$1] )) may not be very useful. OTOH we've probably now batted this back and forth way too much, too.