zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Hahler <genml+zsh-workers@thequod.de>
To: zsh-workers@zsh.org
Subject: [PATCH 2/7] completion: git: use %D for %d, without the " (", ")" wrapping
Date: Wed, 13 May 2015 16:26:26 +0200	[thread overview]
Message-ID: <1431527191-32165-3-git-send-email-genml+zsh-workers@thequod.de> (raw)
In-Reply-To: <1431527191-32165-1-git-send-email-genml+zsh-workers@thequod.de>

From: Daniel Hahler <git@thequod.de>

This avoids having to remove this later again.
---
 Completion/Unix/Command/_git | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 962b1e8..2204fc8 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5665,14 +5665,13 @@ __git_recent_commits () {
   local i j k
 
   # Careful: most %d will expand to the empty string.  Quote properly!
-  : "${(A)commits::=${(@f)"$(_call_program commits git --no-pager log -20 --format='%h%n%d%n%s')"}}"
+  : "${(A)commits::=${(@f)"$(_call_program commits git --no-pager log -20 --format='%h%n%D%n%s')"}}"
   __git_command_successful $pipestatus || return 1
 
   for i j k in "$commits[@]" ; do
     # Note: the after-the-colon part must be unique across the entire array;
     # see workers/34768
     descr+=("$i:[$i] $k")
-    j=${${j# \(}%\)} # strip leading ' (' and trailing ')'
     j=${j%% ->*}  # Remove " -> master, origin/master" etc.
     for j in ${(s:, :)j}; do
       if [[ $j == 'tag: '* ]] ; then
-- 
2.4.0.dirty


  parent reply	other threads:[~2015-05-13 14:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-13 14:26 completion: git: various improvements to commit object handling Daniel Hahler
2015-05-13 14:26 ` [PATCH 1/7] completion: git: __git_recent_commits: remove ' ->*' from heads Daniel Hahler
2015-05-13 14:26 ` Daniel Hahler [this message]
2015-05-13 14:26 ` [PATCH 3/7] completion: git: add __git_commit_objects_prefer_recent Daniel Hahler
2015-05-14 14:29   ` Daniel Shahaf
2015-05-13 14:26 ` [PATCH 4/7] completion: git: __git_commit_objects: query 1000 commits Daniel Hahler
2015-05-13 14:26 ` [PATCH 5/7] completion: git: add %cr to commit objects (all and recent) Daniel Hahler
2015-05-13 14:26 ` [PATCH 6/7] completion: git: unique name for __git_recent_commits Daniel Hahler
2015-05-13 14:26 ` [PATCH 7/7] completion: git: add distance_from_head to __git_recent_commits Daniel Hahler
2015-05-17 19:09 ` completion: git: various improvements to commit object handling Daniel Hahler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431527191-32165-3-git-send-email-genml+zsh-workers@thequod.de \
    --to=genml+zsh-workers@thequod.de \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).