diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-10-25 18:34:58 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2015-10-25 18:47:26 +0000 |
commit | f890d442e22fccb94997c400710a88f8415388cf (patch) | |
tree | 6c687e431a36f1cf4e22d21f48ac50f72b5a97ea /Completion/Unix/Command | |
parent | 17af119089379ec1b65b327c72eee3aac93fada7 (diff) | |
download | zsh-f890d442e22fccb94997c400710a88f8415388cf.tar.gz zsh-f890d442e22fccb94997c400710a88f8415388cf.tar.xz zsh-f890d442e22fccb94997c400710a88f8415388cf.zip |
36959: _git: Offer @~$n as completion of recent commits.
Suggested-by: Oliver Kiddle (users/20705)
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_git | 3 |
1 files changed, 2 insertions, 1 deletions
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". |