akinsho / akinsho/toggleterm.nvim

Is it possible to include double quotes in the `cmd` argument?

未关闭
#508 7 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Lua
星标
5.6k
派生
206
PR 合并指标
30 天内没有已合并 PR

描述

I run Windows, and due to organizational constraints I'm forced to have spaces in my directories. I frequently want to execute the open Python file with `TermExec cmd="python %"`. As you can imagine, this causes issues if `%` expands to a path with a space, as you get e.g.:
> python C:/this/is the/file/path.py
Can't open file 'C:/this/is': no such file or directory.

I've tried every which way to escape quotes, mixing single and double quotes, escaping spaces with backslashes/backticks, etc., but I'm getting nowhere. Using the `dir` argument to `TermExec` works if the terminal is not open yet, but it will not change the working directory if there's an open terminal already.

Thoughts?

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。