msys2 / msys2-installer

The one-click installer for MSYS2
BSD 3-Clause "New" or "Revised" License
552 stars 86 forks source link

feature request: msys2-installer install a WindowsTerminal Profile Fragment #31

Open alanlivio opened 3 years ago

alanlivio commented 3 years ago

Conext

I use mys2 inside the WindowsTerminal. To do that I add the following profile in the settings.json.

            {
                "commandline": "C:\\msys64\\msys2_shell.cmd -defterm -mingw64 -no-start -use-full-path -here",
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f519}",
                "hidden": false,
                "icon": "C:\\msys64\\msys2.ico",
                "name": "msys2",
                "startingDirectory": "%USERPROFILE%"
            }

I also use, for different contexts, the bash bundled with from Git For Windows. The Git For Windows Installer has the option to install a WindowsTerminal default profile in Windows Terminal.

See below the installer option and then the json code added to the profile.

image

            {
                "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}",
                "hidden": false,
                "name": "Git Bash",
                "source": "Git",
                "startingDirectory": "%USERPROFILE%"
            },

In the WindowsTerminal, such profile installation is called Profile Fragments. The commit that creates such feature in Git For Windows is this one.

Feature request

That all said. I think it is interesting if the msys2-installer also install a profile for WindowsTerminal.

alanlivio commented 2 years ago

It is currently supported. Thanks.

> winget search msys2
Name            Id                               Version  Source
-----------------------------------------------------------------
MSYS2           msys2.msys2                      20211130 winget
Ruby with MSYS2 RubyInstallerTeam.RubyWithDevKit 3.1.0-1  winget
alanlivio commented 2 years ago

You are right @MehdiChinoune.

alanlivio commented 2 years ago

I found in MSys documentation this guide to add a profile: https://www.msys2.org/docs/terminals/ Just to complement it will be interesting to have it installed together with Msys as a WindowsTerminal Profile Fragment: https://docs.microsoft.com/en-us/windows/terminal/json-fragment-extensions.