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 nm14-vm1.bullet.mail.ir2.yahoo.com by f.primenet.com.au (envelope-from <okiddle@yahoo.co.uk>, uid 7791) with qmail-scanner-2.11 
 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1.  
 Clear:RC:0(212.82.96.189):SA:0(0.0/5.0):. 
 Processed in 0.143583 secs); 22 Jul 2016 19:16:36 -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=FREEMAIL_FROM,SPF_PASS,
	T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1
X-Envelope-From: okiddle@yahoo.co.uk
X-Qmail-Scanner-Mime-Attachments: |
X-Qmail-Scanner-Zip-Files: |
Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.mail.yahoo.com designates 212.82.96.189 as permitted sender)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1469214982; bh=DBcTT1V3RY56KQ8VLJkBplkSXztrO6YePwXoIt8mc/c=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=SfIhMBIQLp8S4XJbvi1MHkGtaBjxMfJdust5YW6myR0uK+zYDMDFdL50nM47maheKoISOYzEJwzEj0sw/aMqcuW9IumKZzFBDkHyk9RFfgBWLn8kRKnZfaFUYjZH0LXPKVOqXrEtyJjhIyW09f7IiDCZgwK/oMWwyiowSjXRBev53djDUYzYGQz5IS6IMW/76/Q7EUgkjhvwwmyqHfSd7vIbUhPg3norab0ayu1CJrrHvAb4aUFpUs2bPohVRZbR+i056vOQxpioNk2hWZ7iZdjCGe/Awe8CqofEO4j0SuSQWt4dZNr51jWFh/EFpTU2ifMdwutiuY62s89PVablog==
X-Yahoo-Newman-Id: 674253.29193.bm@smtp106.mail.ir2.yahoo.com
X-Yahoo-Newman-Property: ymail-3
X-YMail-OSG: jn7Bw6kVM1n_z6OWw0rz4WP5h3MPZmGuWS2BgUnAS7VEFnd
 7tQlVJ9TMHVr1BEV4VwetJhjrH7WQcTV.o_TqCDPm52g5JwVg..yTwvSjtGf
 RqcHYCQtKrA7m5GBdpxcRLtHCxQV90yJ3PkZ2a.Gsnrxt2Xmqvue9SCDoHUa
 0rsWz6j8C663e55Gi158AqVwwTWBPOUBD0gejbt8IylyJwhNXswIETDEp3SY
 KTecR5Fk83x9Vd.vhj1b305A50S_xRshSV1JMUj3LSDkjhyzCZeXS9G4evIo
 RAopMY.z5pxdLdqZCtdEgoNZ82cNsfNLtrbnHEINHtkSgjsh3N2QMtrTRsL7
 J8MjJGqnvtw6w6iG9mQ1dTKcYWP9B8.5_rx1ltH9i3xVy4Vg4Vfm9gc3FRQ6
 HFlfkzvHWjfT5fcLu4TuBTUIq4WQrmdBvZOwDfZvMQDA4TthN2xHBFxUmy23
 7rIogjTM.nzEZzn3qQgpVG1kbuTIUkNucHIaCXw.XZGDFDW1fAKD77XRKxfj
 RQrcgO7i5tmkaQmMDTPVWg6SFfgJtmomnnJoCXxEC7SY-
X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI-
In-reply-to: <20160722062259.GB3457@tarsus.local2>
From: Oliver Kiddle <okiddle@yahoo.co.uk>
References: <160716185103.ZM5258@torch.brasslantern.com> <1468767614-9635-1-git-send-email-danielsh@tarsus.local2> <91351.1468835277@hydra.kiddle.eu> <20160720065421.GE28939@tarsus.local2> <22468.1469114906@hydra.kiddle.eu> <20160722062259.GB3457@tarsus.local2>
To: zsh-workers@zsh.org
Subject: Re: [PATCH v2] Re: [PATCH] _add-zle-hook-widget: New completion.
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <87042.1469213140.1@hydra.kiddle.eu>
Date: Fri, 22 Jul 2016 20:45:40 +0200
Message-ID: <87043.1469213140@hydra.kiddle.eu>
X-Seq: zsh-workers 38921

Daniel Shahaf wrote:
> > Furthermore, while checking that this wasn't intentional I noticed
> > a couple of functions that use _normal where _default was meant.
>
> _default appears to be undocumented.

Actually it sort of is documented: the section on special contexts which
mentions -default- and says that default implementations exist named
_context. Should there perhaps be findex entries there for each context?

Thinking about it, perhaps the original intention was that _dispatch
should be used but direct calls to _default are widespread and date
back to early times. How about the following.

Oliver

diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index 8792324..460cbb6 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -4217,6 +4217,12 @@ This function completes words that are valid at command position: names of
 aliases, builtins, hashed commands, functions, and so on.  With the tt(-e)
 flag, only hashed commands are completed.  The tt(-) flag is ignored.
 )
+findex(_default)
+item(tt(_default))(
+This function corresponds to the tt(-default-) special context. It is
+also used directly as a fallback when a function is unable to provide
+more specific completions.
+)
 findex(_describe)
 redef(SPACES)(0)(tt(ifztexi(NOTRANS(@ @ @ @ @ @ @ @ @ @ ))ifnztexi(          )))
 xitem(tt(_describe )[tt(-12JVx)] [ tt(-oO) | tt(-t) var(tag) ] var(descr) var(name1) [ var(name2) ] [ var(opt) ... ])

