summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-03-18 21:21:43 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-03-21 16:12:10 +0000
commit67136df0bf5d4b75e10c37fb19d49c28e098f052 (patch)
tree91b5c149cd7cbd68ca91c20706032b2e90c98d55
parentcbc44bd64a39649b7c73123c6eb85559d8d26f6c (diff)
downloadzsh-67136df0bf5d4b75e10c37fb19d49c28e098f052.tar.gz
zsh-67136df0bf5d4b75e10c37fb19d49c28e098f052.zip
38180: _git: Improve reflog completion.
Currently, only used by «git reflog delete <TAB>».
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Command/_git4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 6c6e286e2..b708d3e58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-03-21 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * 38180: Completion/Unix/Command/_git: Improve reflog completion.
+
2016-03-21 Peter Stephenson <p.stephenson@samsung.com>
* m0viefreak: 38145: Doc/Zsh/zle.yo, Src/Zle/zle_params.c: Make
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 12410582a..9eeda5837 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5474,10 +5474,10 @@ __git_reflog_entries () {
local expl
declare -a reflog_entries
- reflog_entries=(${${${(f)"$(_call_program reflog-entries git reflog 2>/dev/null)"}#* }%%:*})
+ reflog_entries=(${(f)"$(_call_program reflog-entries "git reflog -1000 --pretty='%gD:[%h] %gs'" 2>/dev/null)"})
__git_command_successful $pipestatus || return 1
- _wanted reflog-entries expl 'reflog entry' _multi_parts @ reflog_entries
+ _describe -Vx -t reflog-entries 'reflog entry' reflog_entries
}
(( $+functions[__git_ref_sort_keys] )) ||