homebrew-core/Formula/fzf.rb
Junegunn Choi 80794c96b7 fzf 0.8.2
Closes Homebrew/homebrew#27992.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-03-30 11:29:21 -05:00

27 lines
726 B
Ruby

require "formula"
class Fzf < Formula
homepage "https://github.com/junegunn/fzf"
url "https://github.com/junegunn/fzf/archive/0.8.2.tar.gz"
sha1 "b1f497f4bdedcc317425fcc6daeefed5df03eb0f"
def install
prefix.install "install", "fzf", "fzf-completion.bash", "fzf-completion.zsh"
bin.install_symlink prefix/"fzf"
(prefix/"plugin").install "plugin/fzf.vim"
end
def caveats; <<-EOS.undent
To install useful keybindings and fuzzy completion:
#{prefix}/install
To use fzf in Vim, add the following line to your .vimrc:
set rtp+=#{prefix}
EOS
end
test do
(testpath/"list").write %w[hello world].join($/)
`cat #{testpath/"list"} | fzf -f wld`.chomp == "world"
end
end