Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Adding a prefix to certain filename completions



> > 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