Created
July 17, 2024 16:17
-
-
Save phaalonso/b39de126c70dce49ed82b17178483d93 to your computer and use it in GitHub Desktop.
Powershell - cd in git repository chosen with fzf
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
$projects = 'project dir' (must end with an \ ) | |
function gitRepo { | |
fd '.git' -H -t d --prune --exclude target --exclude src --exclude logs --exclude node_modules --base-directory $projects | ForEach-Object { $_ -replace '\.git\\','' } | fzf | ForEach-Object { -join($projects, $_) } | cd | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment