diff options
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_vim | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Completion/Unix/Command/_vim b/Completion/Unix/Command/_vim index d1453abd5..23559a1eb 100644 --- a/Completion/Unix/Command/_vim +++ b/Completion/Unix/Command/_vim @@ -1,16 +1,15 @@ #compdef vim exim gvim gex gview rvim rview rgvim rgview evim eview vimdiff gvimdiff +(( $+functions[_vim_files] )) || _vim_files () { - if [[ $(echo $PREFIX*(N)) == '' ]]; then - case $PREFIX in - (+) _message -e 'start at a given line (default: end of file)' ;; - (+<1->) _message -e 'line number' ;; - esac - fi case $PREFIX in - (+*) _files -P './' $* ;; + (+*) _files -P './' $* && return 0 ;; (*) _files $* ;; esac + case $PREFIX in + (+) _message -e 'start at a given line (default: end of file)' ;; + (+<1->) _message -e 'line number' ;; + esac } local arguments |