Created
July 8, 2021 12:00
-
-
Save fbehrens/a135887e418493c61f93a5e455a1d274 to your computer and use it in GitHub Desktop.
profile
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
ipmo Microsoft.PowerShell.ConsoleGuiTools | |
$global:sysCode="C:\Users\fb\code" | |
if( $null -ne (get-psreadlineOption).PredictionSource ) { | |
Set-PSReadLineOption -PredictionSource History } | |
if( $null -ne (get-psreadlineOption).PredictionViewStyle ) { | |
Set-PSReadLineOption -PredictionViewStyle ListView } | |
function glg{ | |
dir $sysCode -filter .git -Hidden -Recurse -Depth 2 | | |
% fullname | | |
% { $_ -replace [regex]::Escape($sysCode),""} | | |
% { $_ -replace "\\\.git$",""} | |
} | |
function cdg{ | |
glg | | |
Out-ConsoleGridView -OutputMode Single | | |
% { Set-Location $sysCode\$_ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment