Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_git: Update __git_merge_strategies to work with new git.
- X-seq: zsh-workers 25500
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: _git: Update __git_merge_strategies to work with new git.
- Date: Thu, 21 Aug 2008 13:43:15 +0200
- 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:mime-version:content-type:content-transfer-encoding :content-disposition; bh=tMk7+gcyu3WYRfemonHB1RmbjLVgTVgkLrQvs4RD+f4=; b=kzFXgsJBcix5qOgZGa/Os3s2Ye9mlyI8LoN1KVGOXbGfN4qqbiCOdhdziTUktwTZ0k QeyMHuEWrBB0CdP2YlhmpK5bKDGiMiN7/+sYFx9RqAdEvgoZtHOK5nQGhGTx3PESjMpq Y9Mvm8XTD4fKZwRefX9NCtI07D49O/MvjQBZg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=KqgzpdmhoEpiUlV4LkuOt+ROr1D4dedaDjTvHY/loB0H0TYLMREOEb+oWqhyvdYtSE oWj6hTSJ/s0G1MPYBepPlq+I/7pSwPgP4qViiq1NLCV+Xr2Bx9zdn3RilFPI/oAu4Uhz HUWVZsmzkukbIYF4LjQq+V6UdyNlQ10kpuDnY=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
This is the corresponding code from the bundled bash-completion:
git merge -s help 2>&1 |
sed -n -e '/[Aa]vailable strategies are: /,/^$/{
s/\.$//
s/.*://
s/^[ ]*//
s/[ ]*$//
p
}'
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7e48c19..c799a40 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4046,7 +4046,7 @@ __git_gpg_secret_keys () {
__git_merge_strategies () {
declare -a merge_strategies_cache
- 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)]}%%.}##*: }})
local expl
_wanted merge-strategies expl 'merge strategy' compadd -
$merge_strategies_cache
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author