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

Re: Adding a prefix to certain filename completions



> I'm sure something along the same lines can
> done with zstyle and compadd and all that other wackiness.
> 
> compctl -f -x 'S[+]' -f -P './' -- vim

<span class="hand" style="position: forehead"> smack </span>

I had assumed there was already an _vim completion, but there's not.
So just write one.

_vim() {
  [[ $PREFIX = +* ]] && _files -P './' || _files
}
compdef _vim vim



Messages sorted by: Reverse Date, Date, Thread, Author