Git Bash Here in Console2 in Total Commander with keyboard shortcut (hotkey)?

Edit 13.8.2014: While still valid, I’d go for ConEmu now. See relevant section in this newer post to set up “bash here” from Total Commander using INI files.

Not sure whether I ever made longer title – but as I had to Google a lot about it and even wrote to Total Commander support email I decided to put it “on paper”. I wanted to press a keyboard shortcut to open Git Bash in Console2 (default window is just as terrible as “cmd”, marking, copying and pasting is just pure pain). Of course in current directory.

Because I have installed Cygwin as well and had it as a default shell for Console2, I decided to add a new tab configuration like this:

Main menu: Edit-Settings-Tabs-Add and then fill up things accordingly

Now the Total Commander part. While I googled a lot how to assign my custom command to a shortcut (hotkey) maybe I used different keywords, maybe I was just unlucky… I wrote to support in the end. Answer goes as this (thanks to Christian Ghisler):

  1. Go to menu Configuration – Options (you can get here with Alt-O twice) – Misc (last option in the list on the left)

  2. Choose your hotkey, I went for Ctrl+B (it doesn’t make any file “bold” I hope)

  3. Click on the small magnifying glass

  4. Click on usercmd.ini (all the way down)

  5. Click on New

  6. Choose a name, e.g. em_git_bash_here

  7. Click OK

  8. Enter the details (see lower)

  9. Click OK in all open dialogs

Here is screenshot of the settings in Total Commander:

Here the -t obviously chooses the tab you want to open and -d sets the initial working directory.

BTW: The last dialog is the same like for a custom button. I actually found a blog about how to add a custom button with Git Bash Here, but assigning it to a hotkey was another story. Also running it in Console2 was easier than it seemed from various internet resources. Many advices pointed to the Windows Registry – but I didn’t want that.

Total Commander itself is a bit tricky. Don’t get me wrong, I love it and that’s why I have bought it (way too late, but I have) and also could appreciate support (right to the point). But when you want to find that %P is “current directory” you better google it. Ctrl+F in the Help window (very good one actually) does not help, because “source path” does not contain neither “current” nor “directory” obviously. 🙂 With Internet at hand these are no problems at all.

BTW2: If you have your command in Total Commander named you can just reference it when you need it for button bar – don’t click on magnifying glass icon, just set Command value to “em_git_bash_here” (or however you named it) and you’re done.

Hope you made it with my procedure and my pictures. May the power of keyboard shortcuts (or hotkeys, whatever ;-)) be with you!

Advertisements

About virgo47
Java Developer by profession in the first place. Gamer and amateur musician. And father too. Naive believer in brighter future. Step by step.

2 Responses to Git Bash Here in Console2 in Total Commander with keyboard shortcut (hotkey)?

  1. Pingback: How To Git Enable Your Console Using GitHub for Windows » Original Mind Pty Ltd

  2. Pingback: Making Windows 7/8 work again | Virgo's Naive Stories

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s