zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 2/5] _git: Offer @~$n as completion of recent commits.
@ 2015-10-25 18:34 Daniel Shahaf
  2015-10-31 12:55 ` __git_recent_commits cannot be called twice " Daniel Shahaf
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Shahaf @ 2015-10-25 18:34 UTC (permalink / raw)
  To: zsh-workers

Suggested-by: Oliver Kiddle (users/20705)
---
Output after the first two patches:

% git commit --fixup=<TAB>
ed49c5f  @~0   - [HEAD]    _git: Offer @~$n as completion of recent commits. (2 minutes ago)
⋮
2685bbc  @~6   - [HEAD~6]  Merge branch 'master' of git://git.code.sf.net/p/zsh/code (15 hours ago)
506d592  @~7   - [HEAD~7]  36943: restore scan for reclaimable blocks in freeheap() (15 hours ago)
e3c6845        - [e3c6845] unposted: _beep completion: Actually hook it for the 'beep' command. (15 hours ago)
779b311        - [779b311] 36913 + 36945: vcs_info quilt: Pass patch subject lines to gen-applied-string (15 hours ago)
c62db9e        - [c62db9e] 36912: vcs_info quilt: Tolerate being in child of .pc's parent (15 hours ago)
272119b  @~8   - [HEAD~8]  unposted: small typo again (16 hours ago)
c8c42d6  @~9   - [HEAD~9]  unposted: small typo (16 hours ago)


 Completion/Unix/Command/_git | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7f9881f..11e2395 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5695,13 +5695,14 @@ __git_recent_commits () {
       else
         label="[HEAD~$distance_from_head]"
       fi
+      descr+=("@~${distance_from_head}":"${label} $k") # CROSSREF: use the same label as below
 
       # Prepare for the next first-parent-ancestry commit.
       (( ++distance_from_head ))
       next_first_parent_ancestral_line_commit=${parents%% *}
     fi
     # label is now 9 bytes, so the descriptions ($k) will be aligned.
-    descr+=($i:"${label} $k")
+    descr+=($i:"${label} $k") # CROSSREF: use the same label as above
 
     j=${${j# \(}%\)} # strip leading ' (' and trailing ')'
     j=${j/ ->/,}  # Convert " -> master, origin/master".
-- 
2.1.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-13 19:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-25 18:34 [PATCH 2/5] _git: Offer @~$n as completion of recent commits Daniel Shahaf
2015-10-31 12:55 ` __git_recent_commits cannot be called twice " Daniel Shahaf
2015-10-31 20:24   ` Oliver Kiddle
2015-11-03 13:42     ` Daniel Shahaf
2015-11-13 19:11     ` 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).