Open Konfekt opened 5 years ago
Please take a look at how
https://github.com/kelleyma49/PSFzf
does it. I am trying to port the helper functions and readline bindings; the only stumbling block is an additional C# binary in PS.IO for inversely reading in history file (which seems overkill as history files can usually be loaded into memory and inverted there).
See https://gist.github.com/Konfekt/32e8e7ed0a77a3b6967fac0292493106 for the gist of these helper functions at PSFzf
crudely adapted to poco
.
@Konfekt Does (Get-Host).UI.RawUI
work in that environment? Or (Get-Host).UI.RawUI.BufferSize.Width
?
Seems so. These are the outputs:
~> (Get-Host).UI.RawUI
ForegroundColor : -1
BackgroundColor : -1
CursorPosition : 0,9
WindowPosition : 0,0
CursorSize : 100
BufferSize : 80,34
WindowSize : 80,34
MaxWindowSize : 80,34
MaxPhysicalWindowSize : 80,34
KeyAvailable : False
WindowTitle :
~> (Get-Host).UI.RawUI.BufferSize.Width
80
Under OpenSUSE 15 with PowerShell 6.20 and peco 0.5.3, say
ls | poco
results in a clearance of the screen, but no fuzzy finding interface.