Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _git-reset doesn't complete newly staged files
- X-seq: zsh-workers 38127
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: "Jun T." <takimoto-j@xxxxxxxxxxxxxxxxx>
- Subject: Re: _git-reset doesn't complete newly staged files
- Date: Thu, 10 Mar 2016 15:35:41 +0100
- Cc: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=UCp1M2WWtDV+vad+T6L+GFlengtHIWXE/xTCG+aG3mk=; b=qwlexSZAGcToznfz4ZPiCUXNU7QRR4Lt32LApf36XjTLnNzF1SUeBsoXKAoosRDfsO bR1WdlqIh6px2div5FRdneqN6W6coKUO3tvh+iqS+sjsKr73CZQewJSIYkbu7y1YqPPg N1Kuce1Q36n5gJpjrlMTOCIOq81i81EJwrOsgujho4ek7dT5SMfYlEcOgXRvf/DRSyz0 jSTE+ZHNKW449gO0iKIlG2QWxlbZwihfjHv1zG9RrSdyrSWOHwYxzDB+rRgloyhCTsE/ qMSADWxmUQN2ILyvsft6XhaeoY7rGbS/sqWMa8dMc3BMb6q8eF/JhbTJNX3ga9iuzEla mMgw==
- In-reply-to: <F614B9C0-B219-43E4-9A82-519F57D3DC84@kba.biglobe.ne.jp>
- 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
- References: <20160309132444.GA2428@tarsus.local2> <F614B9C0-B219-43E4-9A82-519F57D3DC84@kba.biglobe.ne.jp>
On Thu, Mar 10, 2016 at 1:03 PM, Jun T. <takimoto-j@xxxxxxxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author