Skip to content

Instantly share code, notes, and snippets.

@etorreborre
Last active March 15, 2021 17:43
Show Gist options
  • Save etorreborre/f245e7c561e3a3472e0d347943d2b645 to your computer and use it in GitHub Desktop.
Save etorreborre/f245e7c561e3a3472e0d347943d2b645 to your computer and use it in GitHub Desktop.
fzf
How to Use Fzf in GHCi
by Vanessa McHale | 2019-08-27 01:27
I use fzf when I'm on the command-line. To configure GHCi to use fzf instead of haskeline's built-in search:
Put the following in $HOME/.haskeline:
bind: ctrl-r : f z f return
and the following in $HOME/.ghci:
:def fzf \_ -> pure $ ":!cat $HOME/.ghc/ghci_history | fzf --height 25"
The downside is this will rebind C-r for all haskeline applications, such as Dhall, Egison, Futhark, PureScript.
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment