Browse Source

Make sure that ctags-exuberant is installed before using it with the vim wrapper.

Emmanuel Bouthenot 14 years ago
parent
commit
69448399f6
1 changed files with 7 additions and 4 deletions
  1. 7 4
      .vim/bin/ctags-exuberant

+ 7 - 4
.vim/bin/ctags-exuberant

@@ -1,7 +1,10 @@
 #!/bin/sh
 
-if echo $@|grep -- "--language-force=php" >/dev/null 2>&1 ; then
-    ctags-exuberant $(echo $@ | sed 's/--language-force=php//' | sed 's/--php-types=[^ ]*//')
-else
-    ctags-exuberant $@
+if which ctags-exuberant &>/dev/null; then
+    if echo $@|grep -- "--language-force=php" >/dev/null 2>&1 ; then
+        ctags-exuberant $(echo $@ | sed 's/--language-force=php//' | sed 's/--php-types=[^ ]*//')
+    else
+        ctags-exuberant $@
+    fi
 fi
+