Skip to content

Instantly share code, notes, and snippets.

@jelster
Created July 14, 2020 13:39
Show Gist options
  • Save jelster/ccb7cb930426d2d30b70ed24e974bc48 to your computer and use it in GitHub Desktop.
Save jelster/ccb7cb930426d2d30b70ed24e974bc48 to your computer and use it in GitHub Desktop.
Which... for Powershell
function which([string]$name) {
return (get-command $name -UseFuzzyMatching).Definition;
}
@jelster
Copy link
Author

jelster commented Jul 14, 2020

Sample Usage:

❯ which gi*
Get-Item
Get-ComputerInfo
C:\Program Files\Git\cmd\git-gui.exe
C:\Program Files\Git\cmd\git-lfs.exe
C:\Program Files\Git\cmd\git.exe
C:\Program Files\Git\cmd\gitk.exe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment