homebrew-core/Formula/sk.rb
Jinzhou Zhang ff633d11ec
sk 0.6.6 (new formula)
Closes #38283.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2019-04-14 21:33:53 +01:00

27 lines
928 B
Ruby

class Sk < Formula
desc "Fuzzy Finder in rust!"
homepage "https://github.com/lotabout/skim"
url "https://github.com/lotabout/skim/archive/v0.6.6.tar.gz"
sha256 "5975b21a7c3792e910ee9439b41b417e92f2fc7bc92d033e2d4c6d6c48a469c8"
head "https://github.com/lotabout/skim.git"
depends_on "rust" => :build
def install
(buildpath/"src/github.com/lotabout").mkpath
ln_s buildpath, buildpath/"src/github.com/lotabout/skim"
system "cargo", "install", "--root", prefix, "--path", "."
pkgshare.install "install"
bash_completion.install "shell/key-bindings.bash"
bash_completion.install "shell/completion.bash"
zsh_completion.install "shell/key-bindings.zsh"
zsh_completion.install "shell/completion.zsh"
man1.install "man/man1/sk.1", "man/man1/sk-tmux.1"
bin.install "bin/sk-tmux"
end
test do
assert_match /.*world/, pipe_output("#{bin}/sk -f wld", "hello\nworld")
end
end