-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Windows Terminal for MSYS2 #1669
Comments
Yes, works fine, unless you have TERM set to xterm-256color (eg. home and end key not working). {
"acrylicOpacity": 0.75,
"closeOnExit": false,
"colorScheme": "Argonaut",
"commandline": "msys2.cmd",
"cursorColor": "#FFFFFF",
"cursorShape": "bar",
"fontFace": "Source Code Pro for Powerline",
"fontSize": 10,
"guid": "{09dc5eef-6840-4050-ae69-21e55e6a2e63}",
"historySize": 9001,
"icon": "ms-appdata:///roaming/msys2.ico",
"name": "MSYS2",
"padding": "0, 0, 0, 0",
"snapOnInput": true,
"useAcrylic": true
} With @echo off
setlocal
set PATH=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Docker\Docker\resources\bin
set MSYS2_PATH_TYPE=inherit
REM set TERM=xterm-256color
set MSYSROOT=C:\tools\msys64
if "%MSYSTEM%"=="" (
set MSYSTEM=MSYS
)
set CHERE_INVOKING=1
%MSYSROOT%\usr\bin\zsh.exe --login |
@MoeRT09, yes, at the moment, the only solution to start MSYS2 and friends is to create an ad hoc Just this works,
but without setting the environment. Maybe, soon, the Windows Terminal developers will add this possibility to the profiles settings. Thanks. |
If you installed them with scoop -
|
Use these:
|
Hi, for a solution with full terminal capability, check out: |
@MeowningMaster, yes I know but I am using this:
|
Here's what I'm current using, that covers all five of the current MSYS2 MSYSTEMs, and does not end up with a needless {
"guid": "{c1372a71-8d9f-49d7-99db-8cb284c50b98}",
//"commandline": "\"C:/msys64/msys2_shell.cmd\" -defterm -no-start -msys2",
"commandline": "C:/msys64/usr/bin/env.exe MSYS='enable_pcon winsymlinks:nativestrict' CHERE_INVOKING=1 MSYSTEM=MSYS /bin/bash --login",
"icon": "C:/msys64/msys2.ico",
"name": "MSYS2 MSYS",
"startingDirectory": "%USERPROFILE%"
},
{
"guid": "{2367860f-e6b6-4e91-821a-287e0cceee71}",
//"commandline": "\"C:/msys64/msys2_shell.cmd\" -defterm -no-start -mingw64",
"commandline": "C:/msys64/usr/bin/env.exe MSYS='enable_pcon winsymlinks:nativestrict' CHERE_INVOKING=1 MSYSTEM=MINGW64 /bin/bash --login",
"icon": "C:/msys64/mingw64.ico",
"name": "MSYS2 MinGW 64-bit",
"startingDirectory": "%USERPROFILE%"
},
{
"guid": "{098bcacf-f271-4b79-b6c3-315bb4240e54}",
//"commandline": "\"C:/msys64/msys2_shell.cmd\" -defterm -no-start -mingw32",
"commandline": "C:/msys64/usr/bin/env.exe MSYS='enable_pcon winsymlinks:nativestrict' CHERE_INVOKING=1 MSYSTEM=MINGW32 /bin/bash --login",
"icon": "C:/msys64/mingw32.ico",
"name": "MSYS2 MinGW 32-bit",
"startingDirectory": "%USERPROFILE%"
},
{
"guid": "{20ca76e4-8d6f-4d37-8468-dbf02385dd18}",
//"commandline": "\"C:/msys64/msys2_shell.cmd\" -defterm -no-start -ucrt64",
"commandline": "C:/msys64/usr/bin/env.exe MSYS='enable_pcon winsymlinks:nativestrict' CHERE_INVOKING=1 MSYSTEM=UCRT64 /bin/bash --login",
"icon": "C:/msys64/ucrt64.ico",
"name": "MSYS2 UCRT 64-bit",
"startingDirectory": "%USERPROFILE%"
},
{
"guid": "{87536769-301c-4fee-89c9-c1aa8950e471}",
//"commandline": "\"C:/msys64/msys2_shell.cmd\" -defterm -no-start -clang64",
"commandline": "C:/msys64/usr/bin/env.exe MSYS='enable_pcon winsymlinks:nativestrict' CHERE_INVOKING=1 MSYSTEM=CLANG64 /bin/bash --login",
"icon": "C:/msys64/clang64.ico",
"name": "MSYS2 Clang 64-bit",
"startingDirectory": "%USERPROFILE%"
}, #2785 will improve this a bit by letting you set the env-vars in the config rather than using #5571 would build on #4000 to make it easier to deal with the multiple Note that I have OSC 9;9 output (see #3158 (comment)) hooked up here, otherwise My OSC 9;9 setup is adding this to ~/.bashrc # Enable OSC 9;9 generation
__osc9_9 () {
history -a # See earlier setting of PROMPT_COMMAND
printf "\033]9;9;%s\033\\" "$(cygpath --windows ${PWD})"
}
export PROMPT_COMMAND="__osc9_9" Edit: Added |
@TBBle, why do you use |
That's the flag to enable psuedo console support, the main upshot of which is that you don't need to use Poking around, I think I added it to my config while trying to understand why tmux doesn't work, I don't recall actually having this issue, as I rarely use native windows console applications under bash/MSYS anyway. The flag Cygwin enables the psuedo console by default, so they offer the |
@TBBle, thanks for clarification. |
Just out of curiosity, has someone tried to create a profile for using the new terminal with MSYS2?
Thanks...
The text was updated successfully, but these errors were encountered: