From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10519 invoked by alias); 18 Oct 2011 18:56:42 -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: 16513 Received: (qmail 12166 invoked from network); 18 Oct 2011 18:56:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, T_TO_NO_BRKTS_FREEMAIL,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at yahoo.co.uk does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1318963841; bh=xd3F2YeKACseQkHJKYVgJQz7Wz2YaNkdMga343jr24c=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:In-reply-to:From:References:To:Subject:Date:Message-ID; b=TOXALRBu4N0xiF6JGnGVxvUrAEgFp3yu4xadsg02SuYQv8JKxpRnjFtUnvQAC8la5GrF3VVLqaXPAJlsDk7zi/m/yvQSFCrw0wtE0KWHmWwYeXpAvmHBkF2I8gJbacky9erQEC8jVQsj9krqi5nLQtnITW2C4rFvGLmO/Ae/+j8= X-Yahoo-Newman-Id: 67292.18584.bm@smtp127.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: OVI0_vEVM1mMg5yZGfpyXfLqwJ.iY2i89Jh.xgzSiLm2bE8 khNJVPZ0ogwbn5ASvULQmmgSmKUCeHOBWTlcdCx5bron5kvA4yPIXnavRDC4 53O.zAhp6_7x3nZ_qOp1ULBEhPBPffE9kbyAfKsfHX6L.TFr3iF9Gbq0eiD8 LrJ_GmPe2.MgLW29Fv68lc_ZxcDpy9rItDw8CVYfe10hDhJcM9W0CmIW4mGu irNyOVgKsFzn9MSiIUObpdZICLmOif9oSKLi1wPfmJp9UzsyhBsIXed7q4YU 2XEKOk3coTaqOQOp3Gnp96JFsULw6CiLtbP823AkBJzan8OQRcFtpCq0euIy M0cKAZaEBucICSm0raCtcAV59eeV1VHsg83CpfHSZ X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <87mxcyv6u6.fsf@deep-thought.43-1.org> From: Oliver Kiddle References: <87mxcyv6u6.fsf@deep-thought.43-1.org> To: zsh-users@zsh.org Subject: Re: Use helper functions for git completion in my own completions Date: Tue, 18 Oct 2011 20:50:39 +0200 Message-ID: <19627.1318963839@thecus.kiddle.eu> Ansgar Burchardt wrote: > is it possible to use the helper functions defined in "_git" for the git > command in my own completion functions? It seems to work if you modify $words in _git-import-dsc, call _git and rely on it calling you back. As follows: #compdef git-import-dsc if [[ $words[1] = git-* ]]; then words=( ${=words[1]/-/ } ${words[2,-1]} ) _git "$@" return fi The rest of your function can then follow on here and everything in _git should be defined. Oliver