Reputation: 8115
If I use write-host
to define my prompt, Powershell adds "PS>" automatically at the end. How can I use write-host
so that it doesn't do that?
function prompt {
'> '
}
#prompt:
#>
function prompt {
write-host '> ' -foregroundcolor "green"
}
#prompt:
#>
#PS>
Upvotes: 4
Views: 750
Reputation: 8115
Solved; do this:
function prompt {
write-host '>' -foregroundcolor "green" -nonewline
' '
}
#prompt:
#>
Upvotes: 4