I'm trying to see if I can write the output of a command to the prompt buffer to allow for further editing? Something like this, where Write-PromptBuffer is the command desired:
PS C:\> echo "foo bar" | Write-PromptBuffer
PS C:\> foo bar
Something equivalent to what zsh does with print -z (see http://zsh.sourceforge.net/Guide/zshguide03.html)
My main motivation for this is something along the lines of:
PS C:\> Get-Content (Get-PSReadLineOption).HistorySavePath | fzf
Which would "dump" the selected (accepted in fzf lingo) entry as an editable command in the prompt.
(Note: I'm familiar with PSFzf, but I'm trying to find a general purpose command to do this as I have other use cases that would benefit from this)
PSReadlineKeyHandler -boundPlus there's windows, emacs, and vi mode.add-historycommand...