Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 115:bc6ef3d0b84f
ctags: fix output redirection on tcsh
Fixes #48.
author | Ilya Tumaykin <itumaykin@gmail.com> |
---|---|
date | Thu, 25 Feb 2016 01:59:47 +0300 |
parents | 979fab641f29 |
children | be8d47e88ab1 |
comparison
equal
deleted
inserted
replaced
114:979fab641f29 | 115:bc6ef3d0b84f |
---|---|
25 " }}} | 25 " }}} |
26 | 26 |
27 " Gutentags Module Interface {{{ | 27 " Gutentags Module Interface {{{ |
28 | 28 |
29 let s:runner_exe = gutentags#get_plat_file('update_tags') | 29 let s:runner_exe = gutentags#get_plat_file('update_tags') |
30 let s:unix_redir = (&shellredir =~# '%s') ? &shellredir : &shellredir . ' %s' | |
30 | 31 |
31 function! gutentags#ctags#init(project_root) abort | 32 function! gutentags#ctags#init(project_root) abort |
32 " Figure out the path to the tags file. | 33 " Figure out the path to the tags file. |
33 let b:gutentags_files['ctags'] = gutentags#get_cachefile( | 34 let b:gutentags_files['ctags'] = gutentags#get_cachefile( |
34 \a:project_root, g:gutentags_tagfile) | 35 \a:project_root, g:gutentags_tagfile) |
111 endif | 112 endif |
112 if g:gutentags_trace | 113 if g:gutentags_trace |
113 if has('win32') | 114 if has('win32') |
114 let l:cmd .= ' -l "' . l:actual_tags_file . '.log"' | 115 let l:cmd .= ' -l "' . l:actual_tags_file . '.log"' |
115 else | 116 else |
116 let l:cmd .= ' > "' . l:actual_tags_file . '.log" 2>&1' | 117 let l:cmd .= ' ' . printf(s:unix_redir, '"' . l:actual_tags_file . '.log"') |
117 endif | 118 endif |
118 else | 119 else |
119 if !has('win32') | 120 if !has('win32') |
120 let l:cmd .= ' > /dev/null 2>&1' | 121 let l:cmd .= ' ' . printf(s:unix_redir, '/dev/null') |
121 endif | 122 endif |
122 endif | 123 endif |
123 let l:cmd .= gutentags#get_execute_cmd_suffix() | 124 let l:cmd .= gutentags#get_execute_cmd_suffix() |
124 | 125 |
125 call gutentags#trace("Running: " . l:cmd) | 126 call gutentags#trace("Running: " . l:cmd) |