* [PATCH] More git completion tweaks
@ 2015-04-13 20:44 Daniel Shahaf
0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2015-04-13 20:44 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1: Type: text/plain, Size: 10 bytes --]
Attached.
[-- Attachment #2: 0001-completion-git-Fix-another-instance-of-the-34671-bug.patch --]
[-- Type: text/x-patch, Size: 1082 bytes --]
>From dd90cd4f36b9b907cda588b09ecbbd2737fecd70 Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@daniel.shahaf.name>
Date: Sat, 11 Apr 2015 10:13:55 +0000
Subject: [PATCH 1/2] completion: git: Fix another instance of the 34671 bug
fixed in 34814
---
Completion/Unix/Command/_git | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b11c83c..365482c 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5634,7 +5634,9 @@ __git_commit_objects () {
local gitdir expl start
declare -a commits
- : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:%s')"}}
+ # Note: the after-the-colon part must be unique across the entire array;
+ # see workers/34768
+ : ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:\\\[%h\\\]\ %s')"}}
__git_command_successful $pipestatus || return 1
_describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
--
1.9.1
[-- Attachment #3: 0002-completion-git-Sort-commit-object-completions-most-r.patch --]
[-- Type: text/x-patch, Size: 990 bytes --]
>From ab6a61fb2e59a64add6e6d9f24a9efd9ed01726f Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@daniel.shahaf.name>
Date: Thu, 2 Apr 2015 13:28:58 +0000
Subject: [PATCH 2/2] completion: git: Sort "commit object" completions most
recent first
---
Completion/Unix/Command/_git | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 365482c..6a2da17 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5639,7 +5639,7 @@ __git_commit_objects () {
: ${(A)commits::=${(f)"$(_call_program commits git --no-pager log -20 --format='%h:\\\[%h\\\]\ %s')"}}
__git_command_successful $pipestatus || return 1
- _describe -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
+ _describe -V -t commits 'commit object name' commits || _guard '[[:xdigit:]](#c,40)' 'commit object name'
}
(( $+functions[__git_recent_commits] )) ||
--
1.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-13 20:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-13 20:44 [PATCH] More git completion tweaks Daniel Shahaf
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).