Codebase list kali-defaults / 84e5df3
Fix username and hostname order in powershell prompt Daniel Ruiz de Alegría 2 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
1313 If ($NEWLINE_BEFORE_PROMPT -eq 'yes') { Write-Host }
1414 If ($PROMPT_ALTERNATIVE -eq 'twoline') {
1515 Write-Host "┌──(" -NoNewLine -ForegroundColor Blue
16 Write-Host "${bold}$(hostname)㉿$([environment]::username)${reset}" -NoNewLine -ForegroundColor Magenta
16 Write-Host "${bold}$([environment]::username)㉿$(hostname)${reset}" -NoNewLine -ForegroundColor Magenta
1717 Write-Host ")-[" -NoNewLine -ForegroundColor Blue
1818 Write-Host "${bold}$(Get-Location)${reset}" -NoNewLine -ForegroundColor White
1919 Write-Host "]" -ForegroundColor Blue
2121 Write-Host "${bold}PS>${reset}" -NoNewLine -ForegroundColor Blue
2222 } Else {
2323 Write-Host "${bold}PS " -NoNewLine -ForegroundColor Blue
24 Write-Host "$(hostname)㉿$([environment]::username) " -NoNewLine -ForegroundColor Magenta
24 Write-Host "$([environment]::username)㉿$(hostname) " -NoNewLine -ForegroundColor Magenta
2525 Write-Host "$(Get-Location)>${reset}" -NoNewLine -ForegroundColor Blue
2626 }
2727 # Terminal title
28 Write-Host "${esc}]0;PS> $(hostname)@$([environment]::username): $(Get-Location)${bell}" -NoNewLine
28 Write-Host "${esc}]0;PS> $([environment]::username)@$(hostname): $(Get-Location)${bell}" -NoNewLine
2929 return " "
3030 }