From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12027 invoked by alias); 26 Aug 2012 18:34:39 -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: 17212 Received: (qmail 5806 invoked from network); 26 Aug 2012 18:34:28 -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=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.83.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=4ws9mCn0x42E7F/KKvFMWvxoAez6Ie8avkNdEfuuE70=; b=PKJQogZ/OyIRIgtS+eFUXvWMKZ95tV2AVrAfoI9l+c+Oj+ZlFR876Wwm/g8g94F36Y qcJ/SrhR6/+gWEtV/E1RWX2xfj5WJf0bSgKRB8zX4ktki7ALFFqvTmJemJ1VqjZQ44Ue THIulJHqsNRm5ye4HXQsQbQCfZgcZ+Ixr9IMJ0WnwRpLaBljPLeIzm8mSRg85A6gkEpA FbCaBEjwUDltszbM/6kEPK9HG84WszkQdz49KinX6rFMGH32zKE9tHTx5Fg8rI8VVRSz W3y5a5rdSnMjOzsBVma0/qcpM7WMxiy6U2VWmvzBvSyXrcSI1/G6MpGIxxYjTE3Pdyf6 65jQ== MIME-Version: 1.0 From: Pax Unix Date: Sun, 26 Aug 2012 11:28:31 -0700 Message-ID: Subject: How to change description for _user_expand completions? To: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 Many times the completion function I write works, but I've always got the uneasy feeling that it works because of a certain amount of coincidence instead of intent. I feel like I only know just enough completion-system magic to be dangerous, so I'd appreciate any guidance. It would be handy if there were a zsh completion/expansion system cookbook. zshcompsys(1) and zshcompwid(1) explain what's available, but I've found it difficult to figure out the "correct" way to accomplish something and support all of the other features (like configurable styles, etc.) for my functions. My current problem: I've got a function called by _user_expand so I can generate context-independent completions based on a particular prefix. It works perfectly well, but the only description that ever appears is either "all expansions" or "expansions" (or "original"). I want to specify the description string from within my expander function, tailored to the results I'm returning, rather than have to accept the default. I thought I could call _describe, but I can't seem to find the correct parameters to make it work. Is this possible? Or since there could be any number of expansion functions called, do the results have to all be lumped into the same group because there's no tag information specific to each expander? -- Shawn