Skip to content

Instantly share code, notes, and snippets.

View jdharmon's full-sized avatar

Jason Harmon jdharmon

  • PROSOFT
  • Virginia Beach, VA
View GitHub Profile
@jdharmon
jdharmon / Set-RepoLocation.ps1
Last active April 29, 2026 13:04
Quickly navigate into local repository subdirectories with tab completion for the repository names.
$env:REPOS_PATH='C:\Source\Repos'
function Set-RepoLocation ($name) {
Set-Location $(Join-Path $env:REPOS_PATH $name)
}
Set-Alias cdr Set-RepoLocation
Register-ArgumentCompleter -CommandName @('Set-RepoLocation', 'cdr') -ParameterName 'name' -ScriptBlock {
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters)