Launch TexnicCenter from Mingw64 without starting multiple instances?

81 views Asked by At

I am using Git with Mingw64 under Windows 10, but I am new to Git/Linux/bash.

I would like to define a texniccenter command in the Mingw64 interpreter so that if I type

texniccenter my_file.tex

my_file.tex will open in the running instance of TexnicCenter if there is one, or in a new one if no instance is running. Based on an answer to Command to open file with git, I have created a file called texniccenter with the following content

#!/bin/sh
"C:\Program Files\TeXnicCenter\TeXnicCenter.exe" "$1" &

and I have saved it to "C:\Program Files\Git\usr\bin". This works fine, but starts a new instance of TexnicCenter every time. I have read that I have to use command-line option /ddecmd to prevent TexnicCenter from starting a new instance, but I am not sure where to put it in the above command. I have tried many combinations of quotes and slashes/backslashes to escape the slash in /ddecmd, but nothing has worked so far.

In case this matters, I am asking this question because I would like to configure Git to use TexnicCenter to show the content of a file from a specified commit. Based on an answer to https://superuser.com/questions/772269/how-can-i-pipe-console-output-directly-to-notepad, I would like to type

git show a_branch_name:my_file.tex | clip && texniccenter

but I have to define texniccenter first.

0

There are 0 answers