From f890d442e22fccb94997c400710a88f8415388cf Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 25 Oct 2015 18:34:58 +0000 Subject: 36959: _git: Offer @~$n as completion of recent commits. Suggested-by: Oliver Kiddle (users/20705) --- Completion/Unix/Command/_git | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 279331b00..740aec4cd 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". -- cgit v1.2.3