Write-Host adds "PS>" at the end of prompt?

powershell, prompt

Solution

Solved; do this:

function prompt {
    write-host '>' -foregroundcolor "green" -nonewline
    ' '
}

#prompt:
#>

Problem

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> ```

Original source