homebrew-core/Formula/fzf.rb
Mike Naberezny c2e501c731 fzf: use full path of executable
Closes Homebrew/homebrew#29498.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2014-05-22 12:19:16 -07:00

27 lines
742 B
Ruby

require "formula"
class Fzf < Formula
homepage "https://github.com/junegunn/fzf"
url "https://github.com/junegunn/fzf/archive/0.8.4.tar.gz"
sha1 "249d9c722ab08bd52d50a3a3b1bf843051fb94ed"
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($/)
assert_equal "world", `cat #{testpath}/list | #{bin}/fzf -f wld`.chomp
end
end