Fzf: PowerShell bindings

Created on 22 Aug 2016  路  6Comments  路  Source: junegunn/fzf

I've started using PowerShell, but am missing fzf. It'd be great to have PowerShell hooked up to fzf. In particular, ctrl-r.

Most helpful comment

Seems like this is now supported by https://github.com/kelleyma49/PSFzf

All 6 comments

My attempt so far:

Set-PSReadlineKeyHandler -Key Ctrl+r `
    -ScriptBlock {
        Get-Content (Get-PSReadlineOption).HistorySavePath | fzf +s -m --tiebreak=index --tac --toggle-sort=ctrl-r > foo
        $fzf=cat foo
        [Microsoft.PowerShell.PSConsoleReadLine]::Insert($fzf)
    }

There's a bug though: when I hit Ctrl-r, fzf is executing (according to ps), but I cannot see fzf's curses interface. I wonder if this is a limitation of PowerShell's PSReadline?

This https://github.com/junegunn/fzf/blob/master/src/README.md#system-requirements says Windows is not supported.

I'm using PowerShell on OSX, sorry, I should have mentioned.

OSX 10.11.6
fzf 0.13.2

@balta2ar Turned out that fzf can now work on Windows with its new linux subsystem. See https://github.com/junegunn/fzf.vim/issues/186

@tomfitzhenry Hi, unfortunately I have zero experience in PowerShell, so I can't really help you with this. Please let me know if you find the solution.

Seems like this is now supported by https://github.com/kelleyma49/PSFzf

@prabirshrestha Thanks. I'll mention the project somewhere on the wiki.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fenuks picture fenuks  路  3Comments

ahmedelgabri picture ahmedelgabri  路  3Comments

natemara picture natemara  路  3Comments

asilvadesigns picture asilvadesigns  路  3Comments

skamsie picture skamsie  路  3Comments