Archives
-
Open Git Bash for Recent Visual Studio [Code] Projects/Folders with Just a Few Keystrokes
Emaroo is a free utility for browsing most recently used (MRU) lists of a variety of programs for developers and designers.
Download Emaroo on www.roland-weigelt.de/emaroo.
Tip: When you pin Emaroo to the taskbar and drag the icon to the left, you can quickly start it by pressing the Windows key and a number (e.g. Win+1 if the icon is in the leftmost position).
In addition to opening files or folders and a couple of other built-in features, Emaroo also allows used-defined custom actions. A custom action runs an executable of your choice, with arguments and/or a working directory specified using macros similar to those for the pre-build/post-build events in Visual Studio. You execute a custom action either via the context menu or via one of the hotkeys Ctrl+1, …, Ctrl+9, Ctrl+0.
A Custom Action for Git Bash
- Copy the following URL (direct link to one of the custom actions available on GitHub):
https://raw.githubusercontent.com/RWeigelt/EmarooCustomActions/master/git/GitBashHere.action.json
- Launch Emaroo
- Open the settings page:
- Click "Import"
- Paste the clipboard content into the "File name:" field and press the “Open” button
- Change to the Visual Studio page
- You'll find the custom action in the lower left corner…
…and in the context menus of the list items: - Repeat the steps for the other Visual Studio versions and/or Visual Studio Code
How It’s Done
Let’s take a look how the custom action is defined:
- Either open the context menu on the custom action in the lower left corner of the Visual Studio tab…
…or, if you are on the settings tab, press the pen icon on the custom action: - This will open the following dialog:
- For the Git Bash custom action,
- the “Executable” field contains the full path of
git-bash.exe
, - we don’t need anything in the “Arguments” field
- and we’ll start
git-bash.exe
in the directory of the currently selected project in the Visual Studio MRU list (using the$(DirPath)
macro).
See also
- Copy the following URL (direct link to one of the custom actions available on GitHub):