Created
May 8, 2019 19:00
-
-
Save lawrence-laz/0ad2a1a04d0546272eba4974cc69f6de to your computer and use it in GitHub Desktop.
Tools that opens PowerShell in Unity project's Git root folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Diagnostics; | |
using UnityEditor; | |
public static class PowerShellOpener | |
{ | |
[MenuItem("Tools/PowerShell")] | |
private static void NewMenuOption() | |
{ | |
var process = new ProcessStartInfo("powershell.exe") | |
{ | |
WindowStyle = ProcessWindowStyle.Maximized, | |
Arguments = "-noexit git rev-parse --show-toplevel | cd" | |
}; | |
Process.Start(process); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment