summary refs log tree commit diff
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
parentd4f81ce410673ff32df46dc446e72c3dfecc2b74 (diff)
downloadzsh-b334c31e18eca35742af07efb2dfabdc2cf984d9.tar.gz
zsh-b334c31e18eca35742af07efb2dfabdc2cf984d9.tar.xz
zsh-b334c31e18eca35742af07efb2dfabdc2cf984d9.zip
users/9059: Nikolai Weibull: improved _vim_files
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_vim13
2 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index c5a373cb4..a28e6d352 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-08  Peter Stephenson  <pws@csr.com>
+
+	* users/9059: Nikolai Weibull: Completion/Unix/Command/_vim:
+	improved _vim_files.
+
 2005-07-07  Peter Stephenson  <pws@csr.com>
 
 	* users/9049: Completion/Unix/Command/_vim: add variant names
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