summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-07-08 10:33:34 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-07-08 10:33:34 +0000
commitb334c31e18eca35742af07efb2dfabdc2cf984d9 (patch)
tree629c91fda31e8349fdb8b2c9857d4f88995bc947 /Completion/Unix
parentd4f81ce410673ff32df46dc446e72c3dfecc2b74 (diff)
downloadzsh-b334c31e18eca35742af07efb2dfabdc2cf984d9.tar.gz
zsh-b334c31e18eca35742af07efb2dfabdc2cf984d9.tar.xz
zsh-b334c31e18eca35742af07efb2dfabdc2cf984d9.zip
users/9059: Nikolai Weibull: improved _vim_files
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_vim13
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