Package: vim-scripts
Version: 20081206-1
Severity: normal
Tags: patch

Hi,
I recently stumbled over this error, that lbdbq.vim is not checking
for the existence of lbdbq and therefore will fail without any obvious
reason. 

The attached patch fixed that.

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (900, 'unstable'), (750, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.18-2-486
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

vim-scripts depends on no packages.

Versions of packages vim-scripts recommends:
ii  vim                          2:7.2.049-2 Vi IMproved - enhanced vi editor
ii  vim-addon-manager            0.4         manager of addons for the Vim edit
ii  vim-gtk [vim]                2:7.2.049-2 Vi IMproved - enhanced vi editor -

Versions of packages vim-scripts suggests:
pn  libtemplate-perl              <none>     (no description available)
pn  perlsgml                      <none>     (no description available)

-- no debconf information

Grüße
Christian
--- lbdbq.vim.alt	2009-02-10 23:11:34.000000000 +0100
+++ lbdbq.vim	2009-02-10 23:08:14.000000000 +0100
@@ -14,7 +14,11 @@
 " queries lbdb with a query string and return a list of pairs:
 " [['full name', 'email'], ['full name', 'email'], ...]
 function! LbdbQuery(qstring)
-  let output = system("lbdbq '" . a:qstring . "'")
+  let qry="lbdbq"
+  if !executable(qry)
+      echoerr qry . " is not executable! Have you installed lbdb?"
+  let output = system(qry . " '" . a:qstring . "'")
   let results = []
   for line in split(output, "\n")[1:] " skip first line (lbdbq summary)
     let fields = split(line, "\t")

Reply via email to