Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Adding a prefix to certain filename completions
- X-seq: zsh-users 9038
- 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 10:07:19 -0700 (PDT)
- Cc: zsh-users <zsh-users@xxxxxxxxxx>
- In-reply-to: <20050705172846.GB5362@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050704193711.GF6330@xxxxxxxxxxxxxxxx> <20050705042324.GA21301@xxxxxxxxxxxxxxxxx> <20050705080946.GC5333@xxxxxxxxxxxxxxxx> <Pine.OSX.4.58.0507050720380.17349@xxxxxxxxxxxxxxx> <20050705172846.GB5362@xxxxxxxxxxxxxxxx>
> > function vim { command vim ./"$@" }
>
> That will definitely not work. Specifically it won’t work for multiple
> file arguments (or options for that matter),
> nikolai
The longer version I sent about an hour ago does (once you correct the
last line as I quickly found). It tests each element of the input array
and decides if it is a file or not (i.e., is an argument). Then if that
element of the array is in the $PWD, it appends your fix, otherwise it
leaves it alone.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author