1

I have the same question as this prior Stackoverflow post. I got helicoptered into this situation due to git for Windows, not MinGW or cygwin, so the answers in that post don't seem viable.

I would like to start mintty from a Windows cmd.exe prompt, but when I type mintty there, I get this dialog box:

enter image description here

I always want to use MSYS2, so how can I tell mintty to use that instead of always going through the dialog box? I've tried the various options from this page but again these all assume I'm using MinGW or cygwin, not acquiring mintty/MSYS from git. Thanks!

cniggeler
  • 103
  • 1
  • 9

1 Answers1

1

I just tried:

mintty -o MSYSTEM=MSYS

It did open immediately a MSYS2 bash.

MSYS2 bash

That works if Git and its Linux commands are in the PATH:

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • That got real close! When I run it, this line appears above the mintty prompt: "bash: cut: command not found". There word "cut" does not appear ~/.bashrc. Also, many Linux commands like "cat" and "type" are missing when started with -o vs. starting without operands and then clicking on MSYS2. – cniggeler May 15 '20 at 22:10
  • @cniggeler Yes, I have added the PATH I am using for this to work. – VonC May 15 '20 at 23:24
  • I'll try it, but ti clutters my Windows path. Would you know why the behavior is different running mintty and mintty -o... ? – cniggeler May 15 '20 at 23:27
  • @cniggeler It relies on Linux command that `mintty` alone will include in its execution path. If you bypass that (with `mintty -o`), you need to have the right path alreadt set, since mintty won't set it up for you. Test it out. – VonC May 15 '20 at 23:48
  • I added the directories you specified to .bashrc PATH instead of Windows' PATH. Working like a champ (except for the missing "cut" command, but not affecting anything). Thank you ! +1 – cniggeler May 16 '20 at 01:38