Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: _git: Update __git_merge_strategies to work with new git.



On Thu, Aug 21, 2008 at 01:43:15PM +0200, Mikael Magnusson wrote:
> -  merge_strategies_cache=(${${=${${(M)${(f)"$(<$(git
> --exec-path)/git-merge)"}:#all_strategies*}##all_strategies=\'}%%\'}:#recur})
> +  merge_strategies_cache=(${(s: :)${${${${(ps:\n:)"$(git merge -s ''
> 2>&1)"}[(r)Available strategies are: *,(r)]}%%.}##*: }})

With 1.5.6.3 I get no capital A:

% git merge -s ''
available strategies are: recur recursive octopus resolve stupid ours subtree

Also (ps:\n:) can be written as (f), but is the output ever more than
one line?

See if 

merge_strategies_cache=(${=${${"$(git merge -s '' 2>&1)"}#[Aa]vailable strategies are: }})

does the right thing for you.



Messages sorted by: Reverse Date, Date, Thread, Author