homebrew-core/Formula/fzf.rb
Junegunn Choi 41e997b24d fzf 0.8.7
Closes .

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-16 19:04:49 +01:00

27 lines
769 B
Ruby

require "formula"
class Fzf < Formula
homepage "https://github.com/junegunn/fzf"
url "https://github.com/junegunn/fzf/archive/0.8.7.tar.gz"
sha1 "1b40452c5d9707de269b31ec83bb0ae7e1f00504"
def install
prefix.install "install", "uninstall", "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($/)
assert_equal "world", shell_output("cat #{testpath}/list | #{bin}/fzf -f wld").chomp
end
end