Prompt function with Write-Host on MacOS 10.12.5
See original GitHub issueSteps to reproduce
When overwriting the prompt function as follows:
function prompt {
    Write-Host "Something> "
    " "
}
The reason why one would want to manually use Write-Host for outputting prompt values, is to be able to use colors. This is done in posh-git for example. In windows this works as expected.
Expected behavior
Something> --input goes here--
Actual behavior
Something>
 Something>
--cursor position--
When i start typing the input appears as follows:
Something>
--input appears here--
Environment data
> $PSVersionTable
Name                           Value                                           
----                           -----                                           
PSVersion                      6.0.0-beta                                      
PSEdition                      Core                                            
BuildVersion                   3.0.0.0                                         
CLRVersion                                                                     
GitCommitId                    v6.0.0-beta.1                                   
OS                             Darwin 16.6.0 Darwin Kernel Version 16.6.0: F...
Platform                       Unix                                            
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                         
PSRemotingProtocolVersion      2.3                                             
SerializationVersion           1.1.0.1                                         
WSManStackVersion              3.0 
Issue Analytics
- State:
 - Created 6 years ago
 - Comments:12 (3 by maintainers)
 
Top Results From Across the Web
macos - I typed () in terminal and got a prompt. What is it for?
I realized I can type any gibberish anygibberish() and also get the prompt. If you continue to type () at the function> prompt,...
Read more >Restore the Desktop Discord Client on OS X 10.9 - macOS ...
To make the process of restoring Desktop client functionality very easy, I've written a small Python program (10.9+, no need to use a...
Read more >Command Line – Page 8
Posts about Command Line written by ab. ... On macOS the host keys are stored in /private/etc/ssh/ along with some other files required...
Read more >macOS – SSH Error 'No Matching Exchange Method Found'
Mac SSH error Problem seen after upgrading macOSX to Sierra, where Open SSH Version 7 stops you communicating with devices using RSA SHA1...
Read more >macOS 10.13 High Sierra on ESXi 6.5 | iThinkVirtual™
It will prompt for your password since you are using "sudo". You will not be able to see what you type nor will...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

FWIW, on beta.3 this is still an issue. This shows up on Terminal.app and iterm2 with just PSReadline and the example prompt in this issue. Things are resolved if PSReadline module is removed, but all history, tab completing, etc functionality is gone (obviously).
Ah, ok… I missed the initial PSReadline reference - thanks 😃