homebrew-core/Formula/fzf.rb
Junegunn Choi 0a3a66e22c fzf 0.8.6
Closes Homebrew/homebrew#30694.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2014-07-06 11:49:17 -05:00

27 lines
755 B
Ruby

require "formula"
class Fzf < Formula
homepage "https://github.com/junegunn/fzf"
url "https://github.com/junegunn/fzf/archive/0.8.6.tar.gz"
sha1 "59d06b0e5c51e912f3d8b1e7bc23c8ae9d7965ac"
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", `cat #{testpath}/list | #{bin}/fzf -f wld`.chomp
end
end