From 6edb9948e61ece9ceb29983e2b9ffea7ecb5acdf Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Sun, 10 Dec 2017 12:09:09 -0500 Subject: [PATCH] ddgr 1.2 (new formula) Closes #21539. Signed-off-by: ilovezfs --- Formula/ddgr.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Formula/ddgr.rb diff --git a/Formula/ddgr.rb b/Formula/ddgr.rb new file mode 100644 index 0000000000..4ff0d73cbe --- /dev/null +++ b/Formula/ddgr.rb @@ -0,0 +1,20 @@ +class Ddgr < Formula + desc "DuckDuckGo from the terminal" + homepage "https://github.com/jarun/ddgr" + url "https://github.com/jarun/ddgr/archive/v1.2.tar.gz" + sha256 "a9828b8863949dc93dd574a15b6779d9390b6f5e277e35c157064d7c06423758" + + depends_on :python3 + + def install + system "make", "install", "PREFIX=#{prefix}" + bash_completion.install "auto-completion/bash/ddgr-completion.bash" + fish_completion.install "auto-completion/fish/ddgr.fish" + zsh_completion.install "auto-completion/zsh/_ddgr" + end + + test do + ENV["PYTHONIOENCODING"] = "utf-8" + assert_match "Homebrew", shell_output("#{bin}/ddgr --noprompt Homebrew") + end +end