bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gtags plugin fails at call to system function using vim 6.4


From: Arra Avakian
Subject: Gtags plugin fails at call to system function using vim 6.4
Date: Wed, 1 Mar 2006 09:14:59 -0500


This line in gtags.vim seems to be the problem:

    let stuff = system(cmd . '>' . tmpfile)

I am using vim/gvim version 6.4 and ctags 5.5.4.
The tags file from ctags works just fine.
If I use the global command from the command line, its seems to work OK.
The problem is that in the above line, stuff is set with the output of global,
but the tmpfile is not created, i.e. the output redirection does not happen.
(I have determined this by running debug and stepping through the :Gtags
function.) The result is a msg "No errors" and an empty Errors list window
opens, even though the corresponding global command produces output
when run from the command line.

I have experimented using the above form of the system function, and it
does not redirect to the tmpfile. Looking at the vim help for the system
function, it appears that the Gtags.vim usage of redirection is not really
supported, instead it is showing use of the vim 'shellredir' option and
and (unavailable?) {tmp} file. Here are the lines from vim :help system:

                The command executed is constructed using several options:
        'shell' 'shellcmdflag' 'shellxquote' {expr} 'shellredir' {tmp} 'shellxquote'
                ({tmp} is an automatically generated file name).

So now I am stuck:
1. the Gtags usage of the system function does not cause redirection,
2. the documented system function does not seem to give access to the {tmp} output.

Should I try to modify function! s:RunGlobal(...) to use the output in variable stuff?
Is there a way to get the output of the command run by system into a known file?

Help!

Thanks in advance.

Arra Avakian

reply via email to

[Prev in Thread] Current Thread [Next in Thread]