How can I make Geany use the Microsoft Windows Terminal?

0

The Goal

I would like to configure Geany so that it launches my programs in Microsoft Windows Terminal.

What I know

I know that the terminal emulator can be selected under Edit -> Preferences -> Tools -> Terminal, where you can input an arbitrary shell command for Geany to execute. Before executing the command, Geany looks for a %c placeholder and replaces it with the path to a bat file and a few arguments.

For example, Geany's default terminal command on Windows is:

cmd /q /c %c

And the command Geany executes is therefore something like

cmd /q /c "C:\Program Files\Geany\geany-run-helper" "C:\path\to\working\dir" 0 python file_name.py

The Problem

The problem is that once the Windows Terminal is added to this command, something goes wrong with unescaping. Here are some commands I've tried:

  • wt %c results in

    [error 0x80070002 when launching `"C:\Program Files (x86)\Geany\libexec\geany\geany-run-helper" "D:\Users\Aran-Fey\Desktop\temp {e}" 0 python -i untitled.py']

  • wt "%c" results in

    [error 0x80070002 when launching `C:\Program Files "(x86)\Geany\libexec\geany\geany-run-helper D:\Users\Aran-Fey\Desktop\temp" "{e} 0 python -i untitled.py"']

  • wt cmd /q /c %c and wt cmd /q /c "%c" result in

    'C:\Program' is not recognized as an internal or external command, operable program or batch file.

    [process exited with code 1]

Is there any way to make this work?

batch-file
cmd
geany
windows-terminal
asked on Stack Overflow Mar 25, 2021 by Aran-Fey

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0