& {
Clear-Host
$dir = "C:\Users\fsl\.ges"
# 1. Validate path
while (-not (Test-Path $dir)) {
Write-Host " ❌ Path not found: '$dir'" -ForegroundColor Red
Write-Host " 📂 Enter a valid path, or press Enter to use current dir:" -ForegroundColor Yellow
$input = Read-Host " 👉 "
if ([string]::IsNullOrWhiteSpace($input)) {
$dir = (Get-Location).Path
} else {
$dir = $input
}
Write-Host ""
}
# 2. Clean, Dynamic Box (Auto-fits your path perfectly so borders never break)
$pathText = " 📂 Target: $dir"
$width = [Math]::Max($pathText.Length + 4, 46)
$line = "─" * ($width - 2)
Write-Host "┌$line┐" -ForegroundColor Cyan
Write-Host " ✅ PATH VERIFIED SUCCESSFULLY".PadRight($width - 2) -ForegroundColor Green
Write-Host $pathText.PadRight($width - 2) -ForegroundColor Gray
Write-Host "└$line┘" -ForegroundColor Cyan
Write-Host ""
Start-Process "C:\Program Files\Git\git-bash.exe" -ArgumentList "--cd=$dir"
}