Is there a way to move the prompt sign in PowerShell [an also CMD] window more toward middle / right side of a it? So that a new empty line would flash it prompt sign as not being adjacent to the left edge of the window when awaiting for input from user?
This almost does what I need
Code: Select all
Countdown function
function Start-Countdown {
$Countdown = 2
while ($Countdown -gt 0) {
Write-Host ("Countdown: $Countdown seconds") -NoNewline
Start-Sleep -Seconds 1
$Countdown--
Write-Host "`r" -NoNewline
}
}
# Start the countdown
Start-Countdown
# Clear the countdown line
Write-Host "`r"
# Modifications of prompt
$Prompt = " " * 2 + ""
Write-Host $Prompt -NoNewline
# Wait for input from user
Read-Host ""
as it shows
ppp:p_
instead of
[where each >>p<< represent a white pause]
Where is that splitting >>:<< sign coming from? And more importantly: how to get rid of it?
Is there a way to move the prompt sign in PowerShell [an also CMD] window more toward middle / right side of a it? So that a new empty line would flash it prompt sign as not being adjacent to the left edge of the window when awaiting for input from user?
This almost does what I need
[code]
Countdown function
function Start-Countdown {
$Countdown = 2
while ($Countdown -gt 0) {
Write-Host ("Countdown: $Countdown seconds") -NoNewline
Start-Sleep -Seconds 1
$Countdown--
Write-Host "`r" -NoNewline
}
}
# Start the countdown
Start-Countdown
# Clear the countdown line
Write-Host "`r"
# Modifications of prompt
$Prompt = " " * 2 + ""
Write-Host $Prompt -NoNewline
# Wait for input from user
Read-Host ""[/code]
as it shows
[quote]ppp:p_[/quote]
instead of
[code]pppp[/code]
[where each >>p<< represent a white pause]
Where is that splitting >>:<< sign coming from? And more importantly: how to get rid of it?