Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Adding a prefix to certain filename completions
- X-seq: zsh-users 9032
- From: William Scott <wgscott@xxxxxxxxxxxxxxxxxx>
- To: Nikolai Weibull <mailing-lists.zsh-users@xxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: Adding a prefix to certain filename completions
- Date: Tue, 5 Jul 2005 07:25:39 -0700 (PDT)
- Cc: zsh-users <zsh-users@xxxxxxxxxx>
- In-reply-to: <20050705080946.GC5333@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050704193711.GF6330@xxxxxxxxxxxxxxxx> <20050705042324.GA21301@xxxxxxxxxxxxxxxxx> <20050705080946.GC5333@xxxxxxxxxxxxxxxx>
Hi Nikolai:
I don't think this is a completion issue. In any case, this works:
function vim { command vim ./"$@" }
but you will want to put some lines in there to test whether the file is
in $PWD, and if it is, do the above, otherwise, behave normally.
HTH,
Bill
On Tue, 5 Jul 2005, Nikolai Weibull wrote:
> Thomas Köhler wrote:
>
> > Nikolai Weibull wrote:
>
> > > Vim has issues with files that begin with a + (or two +s for that
> > > matter), so I'd like to add a ./ prefix to such files when
> > > completing. I thought I knew how to do this, but alas I do not.
> > > Anyone that does?
>
> > Not knowing the zsh answer, I would add a "--" once before the
> > "strange" file name:
> > vim -- +myfile
>
> Again, the ./ prefix also works. However, I would like for this to be
> handled automatically, kind of like spaces being escaped when completing
> a path containing them. Thanks for responding,
> nikolai
>
> --
> Nikolai Weibull: now available free of charge at http://bitwi.se/!
> Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
> main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author