* [PATCH] _git: stash names completion: Display log messages
@ 2015-10-20 14:22 Daniel Shahaf
0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2015-10-20 14:22 UTC (permalink / raw)
To: zsh-workers
The "$@" argument to compadd is removed because (I think) it contains a -J,
which conflicts with the -V.
Joint with Daniel Hahler.
---
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 1fcde90..719d717 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5487,12 +5487,21 @@ __git_signoff_file () {
(( $+functions[__git_stashes] )) ||
__git_stashes () {
local expl
+ declare -a interleaved
declare -a stashes
+ declare -a descriptions
- stashes=(${(f)"$(_call_program stashes git stash list --pretty=format:%gd 2>/dev/null)"})
+ interleaved=(${(ps:\0:)"$(_call_program stashes git stash list -z --pretty='format:%gd%x00%s%x00\(%cr\)' 2>/dev/null)"})
__git_command_successful $pipestatus || return 1
+ () {
+ local i j k
+ for i j k in $interleaved; do
+ stashes+=($i)
+ descriptions+=("$i: $j $k")
+ done
+ }
- _wanted stashes expl stash compadd "$@" -a - stashes
+ _wanted stashes expl 'stash' compadd -Vx -d descriptions -a - stashes
}
(( $+functions[__git_svn_revisions] )) ||
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-10-20 14:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-20 14:22 [PATCH] _git: stash names completion: Display log messages Daniel Shahaf
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).