Set up git bash to work with tabs on windows

2019-01-30 17:46发布

I have installed console2 and git bash, my goal is to make git bash working with tabs , I have changed the target path on console setting to "C:\Program Files (x86)\Git\bin\sh.exe" --login -i. When I open console it doesn't give me option for tabs anymore.

7条回答
地球回转人心会变
2楼-- · 2019-01-30 18:20

UPDATE

Powershell

Console2 works with powershell. Go to Edit => Settings => Tabs => Add tab => Set Shell to : %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe and set Title to "Powershell". After installing git bash, powershell should work without further configuration.

ConEmu

I found ConEmu's setup window difficult to work with. I gave up on setting a default directory. I use this setup:

ConEmu screen shot

Be careful about clicking buttons in ConEmu. It will overwrite whatever you put in command and the buttons add boilerplate code that does not seem to work whatsoever with Git shell.

查看更多
▲ chillily
3楼-- · 2019-01-30 18:23

ConEmu works perfect, thanks for the pre answers.

I download the newest version, seems the support Git Bash and Cygwin originally. BTW, The shortcut to create a new tab is Win+W, the swith tab shortcut is Ctrl+Tab and Shift+Ctrl+Tab

enter image description here

查看更多
唯我独甜
4楼-- · 2019-01-30 18:24

All the answers here mention ConEmu, but recently I've discovered about Cmder, which seems to do just what you wanted - It's based on ComEmu, but might be easier and more straight-forward for first use.

According to its GitHub page:

Cmder is a software package created out of pure frustration over absence of usable console emulator on Windows. It is based on ConEmu with major config overhaul, comes with a Monokai color scheme, amazing clink (further enhanced by clink-completions) and a custom prompt layout.

The main advantage of Cmder is portability. It is designed to be totally self-contained with no external dependencies, which makes it great for USB Sticks or cloud storage. So you can carry your console, aliases and binaries (like wget, curl and git) with you anywhere.

The Cmder's user interface is also designed to be more eye pleasing, and you can compare the main differences between Cmder and ConEmu here.

查看更多
迷人小祖宗
5楼-- · 2019-01-30 18:32

I've got this working with ConEmu instead.
http://sourceforge.net/projects/conemu/

  1. Install Git Bash
  2. Install ConEmu
  3. Open ConEmu, in settings (top right corner), click "settings"
  4. In the settings tree, open "startup", then "tasks"
  5. Add a new task, or edit one of the existing ones
    • click on the "tab" button in second row from bottom
    • in the first box, enter "[git directory]\bin\sh.exe --login -s"
    • in the second box, enter your preferred startup directory
    • save
    • now assign a hotkey (top right corner) (I have mine on ctrl+T)
  6. You're done! Now you have a multitabbed console in windows, where you can create any number of Git Bash windows via a hotkey.
查看更多
等我变得足够好
6楼-- · 2019-01-30 18:34
  1. Install Git Bash -> Git for Windows v2.9.3
  2. Install ConEMU Version 10.0.17134.48 -->https://conemu.github.io/en/Downloads.html
  3. ConEMU latest version comes preconfigured with gitbash and windows cmd. No settings are required to be done
  4. Open ConEMU
  5. Open windows cmd with new console dialog option -> {Shells::cmd} in ConEMU
  6. Open git bash with new console dialog option -> {Bash::Git bash} in ConEMU

enter image description here

查看更多
啃猪蹄的小仙女
7楼-- · 2019-01-30 18:36

You should change Shell. I think you changed Startup Directory.

Shell settings in Console2

查看更多
登录 后发表回答