Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] _git: offer files relative to current directory
- X-seq: zsh-workers 27485
- From: ÅtÄpÃn NÄmec <stepnem@xxxxxxxxx>
- To: Nikolai Weibull <now@xxxxxxxx>
- Subject: Re: [PATCH] _git: offer files relative to current directory
- Date: Tue, 8 Dec 2009 12:37:29 +0100
- Cc: "Alexey I. Froloff" <raorn@xxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mail-followup-to:references:mime-version:content-type :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=PqvYcbKi6BOZvuXeWiK5b5HkP8fukjurz2Q94kCATAw=; b=ERrjJmib48Wl4LIAon8EBepf6mkb/ouvH3xTiVTYpGLkKkcWDKnzb49z2BuprX/gv+ 9thwIixhJnNjBdDmbWWU8NoxiZ0xkGn6D51y3Zvj7CHXzQIdMbFpVyxqzArpNgjXlWMX 1xS5J8FVQb3RCd1aWopocJGDfSLzgKfhUsTmw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; b=NgiLuxd0T48W4NHI9TAJoDnkUNEJgVUOZMyoXaKk7DOtc89SNlCyMhYAamwq2ByxkA mZ4+zexebrUBu9bsk8jWb38z3BbgnMK9Zu2/qmOHqcL/cHxt5teNjcnBZQB5VJV6qwM/ 1Y8GY64pSXjkYf8hejQM/WDp1N50O6k25iysI=
- In-reply-to: <dbfc82860912080250i7c4e36fcn565d7ea4770c9486@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Nikolai Weibull <now@xxxxxxxx>, "Alexey I. Froloff" <raorn@xxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20091205174551.GF3344@xxxxxxxxxxxx> <1260136353-20093-1-git-send-email-raorn@xxxxxxxxxxxx> <20091207224056.GD9335@xxxxxxxxxxxx> <20091208104839.GC21684@headley> <dbfc82860912080250i7c4e36fcn565d7ea4770c9486@xxxxxxxxxxxxxx>
On Tue, Dec 08, 2009 at 11:50:18AM +0100, Nikolai Weibull wrote:
> On Tue, Dec 8, 2009 at 11:48, ÅtÄpÃn NÄmec <stepnem@xxxxxxxxx> wrote:
>
> > In a repository where `git status' reports the following changed files:
> > # Â Â Â modified: Â doc/tags
> > # Â Â Â modified: Â filetype.vim
> > # Â Â Â modified: Â ftplugin/vim.vim
> > # Â Â Â modified: Â ftplugin/zsh.vim
> > # Â Â Â modified: Â indent/sh.vim
> > # Â Â Â modified: Â plugin/utl.vim
> > # Â Â Â modified: Â snippets/_.snippets
> > # Â Â Â modified: Â syntax/elisp.vim
> > # Â Â Â modified: Â syntax/sh.vim
> > # Â Â Â modified: Â syntax/vim.vim
> >
> > `git commit <tab>' only suggests:
> > doc      filetype.vim Âftplugin   Âindent    Âplugin    Âsnippets   Âsyntax
>
> Whyâs that wrong? Completing git commit syntax hopefully adds a slash
> and lets you complete the files in the sub-folder, right?
Yes, you're right, even though I still prefer when `git ci <tab>' shows
and completes all the files immediately, not forcing me into first
deleting the completed slash and then continue completing the files in
the directory... But I guess Alexey's version might actually be more
consistent with Zsh's behaviour in that regard in other similar
situations. So, sorry for that point.
Unfortunately, there seem to be other problems:
When I enter the doc directory in the above structure, `git commit
<tab>' only shows:
.. tags
instead of all the other changed files/directories (displayed relative
to the current subdirectory). Wasn't exactly that the problem we are
solving here?
ÅtÄpÃn
P.S.: Well now I think about it, of course you can just continue to
"manually" complete the `..', so in my case I have to first complete
../, then delete and recomplete the '/' or add and delete a space, then
continue similarly to get to the other files. Maybe it is the behaviour
you expect and like, but for me it's really suboptimal. Maybe it's just
some problem in my setup? Anyway, with my solution, git ci <tab> always
completes and shows all the files relative to the current directory,
i.e. in the form git-commit will accept, *immediately*. I still very
much prefer that behaviour.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author