summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-05-13 16:14:32 +0200
committerDaniel Hahler <git@thequod.de>2015-05-18 02:48:03 +0200
commit34a1489f436d95bc2404f8e371130a469cbccebe (patch)
tree52166186e48b048a6b0499315041c82a919efa7f /Completion/Unix/Command
parent35106: completion: git: unique name for __git_recent_commits (diff)
downloadzsh-34a1489f436d95bc2404f8e371130a469cbccebe.tar
zsh-34a1489f436d95bc2404f8e371130a469cbccebe.tar.gz
zsh-34a1489f436d95bc2404f8e371130a469cbccebe.tar.bz2
zsh-34a1489f436d95bc2404f8e371130a469cbccebe.tar.lz
zsh-34a1489f436d95bc2404f8e371130a469cbccebe.tar.xz
zsh-34a1489f436d95bc2404f8e371130a469cbccebe.tar.zst
zsh-34a1489f436d95bc2404f8e371130a469cbccebe.zip
35105: completion: git: add distance_from_head to __git_recent_commits
This adds the "HEAD~15" gitrevisions(7) identifier of the commit to the description, which also uniquifies, isn't redundant, and may be easier to type. Ref: zsh-workers/34820 (http://www.zsh.org/mla/workers/2015/msg00744.html)
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_git15
1 files changed, 14 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 4222bf211..708eb2a06 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5672,6 +5672,7 @@ __git_recent_commits () {
local gitdir expl start
declare -a descr tags heads commits
local i j k
+ integer distance_from_head
# Careful: most %d will expand to the empty string. Quote properly!
# NOTE: we could use %D directly, but it's not available in git 1.9.1 at least.