Git Product home page Git Product logo

Comments (6)

skywind3000 avatar skywind3000 commented on June 1, 2024

输入部分 $(?keyword) 已经换成 $(-keyword) 了,看这里:

https://github.com/skywind3000/asynctasks.vim/blob/master/README-cn.md#%E4%BA%A4%E4%BA%92%E5%BC%8F%E4%BB%BB%E5%8A%A1

from asynctasks.vim.

cstsunfu avatar cstsunfu commented on June 1, 2024

输入部分 $(?keyword) 已经换成 $(-keyword) 了,看这里:

https://github.com/skywind3000/asynctasks.vim/blob/master/README-cn.md#%E4%BA%A4%E4%BA%92%E5%BC%8F%E4%BB%BB%E5%8A%A1

额,出错的不是输入部分,是命令里面的 -q <(...) 中的这个括号,下面的这个更明确一点的命令同样会报
sh: 1: Syntax error: "(" unexpected

[vim-grep-word-code-files-clean]
command=vim -u NONE -q <(rg -n --no-heading --color never "anything" "." -tc -tcpp -tpy -tvim -tgo -tlua)
cwd=.
errorformat=%f:%l:%m
output=terminal

但是等价的命令

vim -u NONE -q <(rg -n --no-heading --color never "anything" "." -tc -tcpp -tpy -tvim -tgo -tlua)

直接在terminal中就可以正确执行。

from asynctasks.vim.

cstsunfu avatar cstsunfu commented on June 1, 2024

这个链接可能可以帮助解释这个问题
https://unix.stackexchange.com/questions/45781/shell-script-fails-syntax-error-unexpected

from asynctasks.vim.

cstsunfu avatar cstsunfu commented on June 1, 2024

@skywind3000
hi, 大佬,我发现这个问题应该是 python 的 os.system(command)命令默认调用的是/bin/sh, 但是我们一般用的都是bash、zsh等,使用 subprocess.call(['bash', '-c', command])显式使用bash就可以正确运行
image

但是我不知道这么修改之后会不会影响这个插件的其他逻辑,比如这样显式调用在windows中是否可行?所以没办法提交PR,还请大佬有空帮忙看一下

from asynctasks.vim.

cstsunfu avatar cstsunfu commented on June 1, 2024

直接在command中加 bash -c也可以,不需要修改了。

from asynctasks.vim.

skywind3000 avatar skywind3000 commented on June 1, 2024

试试这个

let g:asyncrun_shell = 'bash'
let g:asyncrun_shellflag = '-c'

from asynctasks.vim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.