Cmder: MSYS2 (https://msys2.github.io/) instead of git-bash

Created on 29 Oct 2015  路  10Comments  路  Source: cmderdev/cmder

It would be nice to use msys2, instead of gitbash. One main advantage msys2 over gitbash and cygwin is the builtin package manager (Pacman). you can easily add new packages and update packages using pacman.

I was using msys2 in my windows7 machine from last 3 months. i also able to integrate it with conemu.

Task def in conemu C:\msys64\usr\bin\mintty /usr/bin/bash --login

for shell integration i have done a hack in registry. I searched for "ConEmu Here" entry in registry and replaced the command with @="\"C:\\Programs\\ConEmu\\ConEmu64.exe\" \"/Single\" /cmd C:\\msys64\\usr\\bin\\mintty.exe /bin/bash -lc 'cd $(cygpath \\'%V\\'); exec bash'"

And in eclipse, using easyshell plugin C:\Programs\ConEmu\ConEmu64.exe /Single /cmd C:\msys64\usr\bin\mintty /bin/bash -lc 'cd $(cygpath \'${easyshell:resource_loc}\'); exec bash'

https://msys2.github.io/

Question

Most helpful comment

  1. Install MSYS2
  2. In Setup tasks - +, add following line:
%ConEmuDrive%\msys64\usr\bin\bash.exe --login -i -new_console:C:"%ConEmuDrive%\msys64\msys2.ico"

3) END

ps. your home in MSYS2 is C:\msys64\home\<user_name>
pss. In Setup tab, you can change default task

.... I HATE markdown's ordered list

All 10 comments

Isn't Cygwin incredibly large? I think the point is to keep this small. one thing I did notice is that the new build uses git 2.5.3, but the newest version is 2.6. We should probably update that before the next release, no? @MartiUK @Stanzilla

Its not cygwin, but a fork of Cygwin with only essential stuffs in an easy-to-install installer (installer is only 54,7 MB). Initially i also used cygwin. but cygwin is too hard to maintain. very hard install more package or update existing once you install it and not portable. Also Cygwin uses some background service

The benefits of MSYS2 (https://msys2.github.io/)

  • 64-bit installer is only 54,7 MB.
  • package manager (Arch PacMan)
  • Easy to update system itself just like we do in any linux distro. Please see section 3 and 4 http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/
  • Easy to install new packages and remove packages using Pacman
  • No background service
  • Gitbash is forked from MSYS2, but have no package manager

Our git for windows version ( @DanielGGordon dev branch has up to date version) is built using msys2, so you already have most (all?) of msys2 anyway.

Git-for-windows works fine out of the box for what most users need. You can contribute a guide in the wiki to replacing git-for-windows with a standard install of msys2 if you like?

  1. Install MSYS2
  2. In Setup tasks - +, add following line:
%ConEmuDrive%\msys64\usr\bin\bash.exe --login -i -new_console:C:"%ConEmuDrive%\msys64\msys2.ico"

3) END

ps. your home in MSYS2 is C:\msys64\home\<user_name>
pss. In Setup tab, you can change default task

.... I HATE markdown's ordered list

You may also need or want to set a few environment variables as in the e.g. msys2_shell.bat file in the msys2 directory (probably C:\msys64). For instance, add in a set MSYSTEM=MSYS & before calling bash. At least for me this I think gets things set up the same way as running those bat files to be in the msys2 system (e.g. PATH). Similarly for mingw64 or mingw32. I'm not sure if setting WD as in the bat file is necessary (anyone know or test this?), and optionally can see the comments in there for MSYS options, like symlinks.

Edit: note that what @fghhfg is suggesting (and I am also doing) is using cmder/ConEmu to run in the msys2 system, rather than embedding it's mintty as in the top comment.

I think a nice addition would be "recipes": currently clink and git are downloaded during the build process. I think it would be nice if there would be more such recipes (and the downloader would be included in the build), so that

  • you can update git and clink even without updating cmder
  • you can add more tasks/...

Integration would only be a printout how to enable msys or other packages (add to path, add a new task to conemu...)...

Why was this closed?

@janschulz See my plug-in support pull raw.

How does this work with the Connector from ConEmu? https://conemu.github.io/en/CygwinMsysConnector.html

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luisrudge picture luisrudge  路  3Comments

sathishsoundharajan picture sathishsoundharajan  路  3Comments

edgariscoding picture edgariscoding  路  3Comments

justinmchase picture justinmchase  路  3Comments

AaronKaa picture AaronKaa  路  3Comments