From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11835 invoked from network); 22 Aug 2008 15:41:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Aug 2008 15:41:58 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 27778 invoked from network); 22 Aug 2008 15:41:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Aug 2008 15:41:53 -0000 Received: (qmail 14284 invoked by alias); 22 Aug 2008 15:41:45 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25509 Received: (qmail 14264 invoked from network); 22 Aug 2008 15:41:43 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 22 Aug 2008 15:41:43 -0000 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by bifrost.dotsrc.org (Postfix) with ESMTP id EF7F1801E2B4 for ; Fri, 22 Aug 2008 17:41:39 +0200 (CEST) Received: by nf-out-0910.google.com with SMTP id g13so583484nfb.11 for ; Fri, 22 Aug 2008 08:41:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=dpLnX07tNarlNNXCiha1+xOcjFsy9S7o0y6FjE7Ik5U=; b=X6IChTicWUTOFTxePSmYoc5vyg6zUDM5Ijmn9zRndEriE4M6aYsS/AAwyM8c4rBhZN NGI5HNzNEMELtGbW8off1HeB0TiN6/37H5XksWJ+Kd4vcrxxTLG5rGSXEu0pFBSThZST J8ndW0z1TUbNUZAPzibC/5sACWs/j9FeBEL48= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ixhNzaCYhiWcfHEinYpRWVbnSguOq+aSpKmScB50A2c3NOVKQMiv8SBZHDj+0MNun+ SZ2YsoQB6amdJduOXfq2ZzBInhBOr66Wslj6EfoeAlfjy8pvBVprPPNCe2non9wctoRZ kC28gEwIt3oBxXp5Hew9HEtpGSKUilF4r5rpo= Received: by 10.210.102.12 with SMTP id z12mr1680287ebb.65.1219419699158; Fri, 22 Aug 2008 08:41:39 -0700 (PDT) Received: by 10.210.19.20 with HTTP; Fri, 22 Aug 2008 08:41:39 -0700 (PDT) Message-ID: <237967ef0808220841x635d8180n7c1b46ab682c8869@mail.gmail.com> Date: Fri, 22 Aug 2008 17:41:39 +0200 From: "Mikael Magnusson" To: zsh-workers Subject: Re: _git: Update __git_merge_strategies to work with new git. In-Reply-To: <20080822103622.GA31581@scru.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0808210443y542c4794v50c5ea0eb1a308f@mail.gmail.com> <20080821122947.GA4065@scru.org> <237967ef0808211319u42388b15w330c324e3f8043e@mail.gmail.com> <20080822103622.GA31581@scru.org> X-Virus-Scanned: ClamAV 0.92.1/8073/Fri Aug 22 14:48:21 2008 on bifrost X-Virus-Status: Clean 2008/8/22 Clint Adams : > On Thu, Aug 21, 2008 at 10:19:18PM +0200, Mikael Magnusson wrote: >> Yes, touch /usr/local/bin/git-merge-clint and +x it: >> % git merge -s '' >> Could not find merge strategy ''. >> Available strategies are: file octopus ours recursive resolve subtree. >> Available custom strategies are: mikachu. > > Doesn't do anything with my version. > >> So it should be >> merge_strategies_cache=(${(s: :)${${${${(f)"$(git merge -s '' >> 2>&1)"}[(r)[Aa]vailable strategies are: *,(r)]}%%.}##*: }}) > > Gives me a blank array. > > Maybe this: > > ${(s: :)${${(M)${(f)"$(git merge -s '' 2>&1)"}:#[Aa]vailable strategies are: *}#[Aa]vailable strategies are: }%.} That doesn't grab the custom strategies line... How about this? Sort of a hack though... :) ${(s: :)${${${${(f)"$(echo; git merge -s '' 2>&1)"}[(r)[Aa]vailable strategies are: *,(r)]}%%.}##*: }} ::Some minutes later:: Aha, my first version didn't work for you because it's only one line, so the (f) doesn't give you an array: % echo ${${(f)"$(echo available strategies are: recur recursive octopus resolve stupid ours subtree)"}[(r)[Aa]vailable strategies are: *]} a I've no idea if you can force an array in a better way than with the echo though. -- Mikael Magnusson