zsh-workers
 help / color / mirror / code / Atom feed
From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh workers <zsh-workers@sunsite.dk>
Subject: PATCH: Fix a bug in completion for 'git aliases'
Date: Sat, 30 Aug 2008 23:34:08 +0200	[thread overview]
Message-ID: <20080830213408.GT6330@fsst.voodoo.lan> (raw)

Consider you got this:
    [alias]
        co = checkout

And try: git co <tab>
...everything looks fine; but then you try: git co -b <tab>
...which should work, too (by displaying a descriptive text:
"branch-name"), but it does not.

The reason for this is too much quoting. This should be the right fix.


Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.93
diff -u -r1.93 _git
--- Completion/Unix/Command/_git	30 Aug 2008 11:36:54 -0000	1.93
+++ Completion/Unix/Command/_git	30 Aug 2008 20:38:48 -0000
@@ -4290,7 +4290,7 @@
   if [[ -z "${words[3,-1]}" ]] ; then
       tmpwords[$(( ${#tmpwords} + 1 ))]=""
   else
-      tmpwords+=("${words[3,-1]}")
+      tmpwords+=(${words[3,-1]})
   fi
   words=("${tmpwords[@]}")
   (( CURRENT += ${#${(z)git_aliases[$words[2]]}} - 1 ))


                 reply	other threads:[~2008-08-30 21:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080830213408.GT6330@fsst.voodoo.lan \
    --to=ft@bewatermyfriend.org \
    --cc=zsh-workers@sunsite.dk \
    /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).