Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 1/3] _git: Improve reflog completion.



Currently, only used by «git reflog delete <TAB>».
---
 Completion/Unix/Command/_git | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 1241058..9eeda58 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] )) ||



Messages sorted by: Reverse Date, Date, Thread, Author