Powershell takes too long to close; can't totally override the default prompt function -
i don't know what's happening powershell. have shell registry key allows me open powershell window in directory. content is:
c:\windows\system32\windowspowershell\v1.0\powershell.exe -executionpolicy unrestricted -noexit
and custom defined prompt function:
function prompt { write-host ("on ") -nonewline -foregroundcolor white write-host ("$env:computername") -nonewline -foregroundcolor gray write-host (" in ") -nonewline -foregroundcolor white write-host ($(get-location)) -foregroundcolor gray write-host ("$") -nonewline -foregroundcolor magenta return "> "; }
it should return
on pc-name in c:\
$>
however, returns this:
on pc-name in c:\
$> ps c:>
anything wrong @ powershell? how more debug information guys?
i fix issue commenting out few functions in psreadline module installed. module add `b end of current prompt, append user prompt it, , restore default prompt when powershell being closed.
Comments
Post a Comment