Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] _git: stash names completion: Display log messages
- X-seq: zsh-workers 36900
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] _git: stash names completion: Display log messages
- Date: Tue, 20 Oct 2015 14:22:25 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=v4P SNg1VP8qQq869KYom+zWKv7E=; b=NRjcWVhLxV0nco8AE2FzJAGZtqSNOhAdQoc FvP1sojwj0mKAVJXKRL19A9pvYMDH2DDweOkv+qBHC1YPqndyq3afcoa4bx4huFe DlhNw9tkOxSSbHJU2WRUAkqkUwrypEQL0CWnaEGiMWoH858f/BD5/v/RCwXenNJG +6nxhxls=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=v4 PSNg1VP8qQq869KYom+zWKv7E=; b=Ntu+tn5KQemqhRbO/YxxHvtnu8WMng1A3c 9hlbZg0RcP5YMGbvkqrabZ/ym8+jn2vFBHO98cUmyhe59IJKqLiEqF+siFgoJWnB 9Pyw6YLbFGd5PPq/6DtFxiowly/7mPgENWw0h+zr2y+KGnjGx/Yro4wPA2m/yWqU DeQITMli8=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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] )) ||
Messages sorted by:
Reverse Date,
Date,
Thread,
Author