How to use the terminal tabs feature in mintty/MSYS2?

2k Views Asked by At

According to https://github.com/mintty/mintty/issues/944 since mintty 3.5.1 there should be a tab bar where you can open multiple tabs with terminals in parallel. For that reason I performed an installation of MSYS2 which includes mintty 3.5.1, as this seems to be the way how to use the mintty. (I verified this with invoking mintty with -V.)

However, I do not find no possibility for opening and/or managing tabs in the UI.

My requirement: I would very much like to have tabs for organizing terminals in parallel.

My question: What's going on here? Did I miss something? Do I need to execute the mintty/MSYS2 with some special commad line options? How can I enable tabs?

2

There are 2 best solutions below

5
John Kexul On

You could use --tabbar option when staring minnty. see here for more information.

0
Daniel Kaplan On

It was difficult for me to figure out how to turn this feature on. The answer is sprinkled through the comments of this issue, but not in one place. Therefore I'm posting this to save time for others. Here's how you turn the feature on:

Add --tabbar=4 or --tabbar to the windows shortcut that opens mintty:

image

The 4 is documented here:

  1. no geometry handling; terminal session windows are separate [default]
  2. sync. position/size when switching/launching/closing a session
  3. sync. also when window is moved or resized
  4. sync. also when window is minimized
  5. sync. also when window is started separately

If you'd like to create new tabs with ctrl-shift-t, close tabs with ctrl-shift-w, switch to previous tabs with ctrl-shift-tab, and switch to next tabs with ctrl-tab, add -o "KeyFunctions=t:new-window-cwd;w:close" as an option to that same line.

Personally, I'd like to have ctrl-t/w open and close tabs, respectively, but the only way I've figured how to do that is to add this option: -o CtrlExchangeShift=yes. The problem is, that changes all ctrl-shift commands to become ctrl commands. That means ctrl-r no longer searches bash history.

When you run the shortcut and create some tabs, mintty will look like this:

enter image description here