akinsho / akinsho/toggleterm.nvim

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

Offen
#508 7 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Lua
Sterne
5.6k
Forks
206
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.