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

[PATCH] completion: git: use `--pretty=format:%gd` with `stash list`



From: Daniel Hahler <git@xxxxxxxxxx>

This appears to be available since a while:

   commit 8f8f5476cd6542387d435c242752404cf144005f
   Author: Thomas Rast <trast@xxxxxxxxxxxxxxx>
   Date:   Mon Oct 19 17:48:10 2009 +0200

       Introduce new pretty formats %g[sdD] for reflog information
---
 Completion/Unix/Command/_git | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index c01333b..5df01f7 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5532,7 +5532,7 @@ __git_stashes () {
   local expl
   declare -a stashes
 
-  stashes=(${${(f)"$(_call_program stashes git stash list 2>/dev/null)"}/: */})
+  stashes=(${(f)"$(_call_program stashes git stash list --pretty=format:%gd 2>/dev/null)"})
   __git_command_successful $pipestatus || return 1
 
   _wanted stashes expl stash compadd "$@" -a - stashes
-- 
2.4.0.dirty



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