Created
April 4, 2012 21:14
-
-
Save ferventcoder/2305721 to your computer and use it in GitHub Desktop.
Somebody's where.exe implementation as powershell ;)
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
$exe = 'git'; | |
if($exe.EndsWith('.exe') -or $exe.EndsWith('.bat')) { $exe = $exe.Substring(0, $exe.Length - 4)}; (ls env:\path).Value.split(';') | %{ if( test-path "$_\$exe.exe" ) { ls "$_\$exe.exe" }; if( test-path "$_\$exe.bat" ) { ls "$_\$exe.bat" }; } | %{ if($_.FullName.EndsWith('.exe') -or $_.FullName.EndsWith('.bat')) { $_.FullName } } |
Can you edit it? I shared it with no one...so it's more hiding in the open than public
Ok, give my fork a shot... :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wasn't ready to see this go public yet ( was like 10 min of hacking )... It's buggy and meh - ENJOY :)