From: Mikael Magnusson <mikachu@gmail.com>
To: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
Cc: "zsh-workers@zsh.org" <zsh-workers@zsh.org>
Subject: Re: _git-reset doesn't complete newly staged files
Date: Thu, 10 Mar 2016 15:35:41 +0100 [thread overview]
Message-ID: <CAHYJk3TTK1fUdZoPyJgHQMOov3tGkO5b8PtnB2snKox9WOf33g@mail.gmail.com> (raw)
In-Reply-To: <F614B9C0-B219-43E4-9A82-519F57D3DC84@kba.biglobe.ne.jp>
On Thu, Mar 10, 2016 at 1:03 PM, Jun T. <takimoto-j@kba.biglobe.ne.jp> wrote:
>
>> Why does __git_ignore_line escape some characters with backslashes
>> before adding them to $ignored?
>
> I'm rather confused. Isn't it better to UN-quote them?
>
> % touch 'a b.txt'
> % git add <TAB>
> this completes a\ b.txt, and
> % git add a\ b.txt <TAB>
> this still completes a\ b.txt.
>
> Using
> ignored+=(${(Q)line[1,CURRENT-1]})
> ignored+=(${(Q)line[CURRENT+1,-1]})
> fixes this. Moreover,
>
> % git add *.txt <TAB>
> this does not complete a\ b.txt anymore.
>
> Or there are something I've overlooked.
Why does _git special case this at all, isn't the generic ignore-line
mechanism for the git-add context good enough?
--
Mikael Magnusson
next prev parent reply other threads:[~2016-03-10 14:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 8:08 Jun T.
2016-03-03 5:07 ` Jun T.
2016-03-07 3:16 ` Jun T.
2016-03-09 13:24 ` Daniel Shahaf
2016-03-09 23:33 ` Daniel Shahaf
2016-03-10 23:15 ` [PATCH] _git: Fix completion of diffs against the index when treeish isn't shell-safe Daniel Shahaf
2016-03-10 12:03 ` _git-reset doesn't complete newly staged files Jun T.
2016-03-10 14:35 ` Mikael Magnusson [this message]
2016-03-10 23:20 ` __git_ignore_line positional argument (un)escaping (was: Re: _git-reset doesn't complete newly staged files) Daniel Shahaf
2016-03-11 8:24 ` Jun T.
2016-03-11 22:13 ` Daniel Shahaf
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=CAHYJk3TTK1fUdZoPyJgHQMOov3tGkO5b8PtnB2snKox9WOf33g@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=takimoto-j@kba.biglobe.ne.jp \
--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).