Closed bennyyip closed 5 years ago
怎么 break 了?我测试了 rg 没问题啊,你的命令是啥?
如果 null,又会 break windows下面的 cmake.
@skywind3000 :AsyncRun rg foo
,返回错误码1。
我觉得保留原来的g:asyncrun_stdin
选项挺好的。
恩,恢复了。
我稍微研究了一下,你如果 stdin=pipe 的情况下 rg foo 是会有问题的,然而:
:AsyncRun rg foo %:p:h
后面跟一个路径名的话,rg 就不需要依赖 stdin=null 了
或者你写明显点:
:AsyncRun rg foo < /dev/null
严格的讲,这一行:
let l:cmd .= "@ rg -S --vimgrep " . a:args . ' ' . l:path
应该是:
let l:cmd .= "@ rg -S --vimgrep " . a:args . ' "' . l:path . '"'
或者
let l:cmd .= "@ rg -S --vimgrep " . a:args . ' ' . shellescape(l:path)
小心包含空格的参数。
谢谢,我改过来了
2.06 changes the way how stdin is handled. https://github.com/skywind3000/asyncrun.vim/blob/master/plugin/asyncrun.vim#L679 sets
l:options['in_io']
to 'pipe', which should be 'null' for rg.