rustc-completion: import from homebrew/completions.

master
Mike McQuaid 2017-01-23 15:26:31 +00:00
parent 3a4c8f1539
commit 35238f7475
1 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,28 @@
class RustcCompletion < Formula
desc "Bash completion for rustc"
homepage "https://github.com/roshan/rust-bash-completion"
head "https://github.com/roshan/rust-bash-completion.git"
stable do
url "https://github.com/roshan/rust-bash-completion/archive/0.12.1.tar.gz"
sha256 "562f84ccab40f2b3e7ef47e2e6d9b6615070a0e7330d64ea5368b6ad75455012"
# upstream commit to fix an undefined command when sourcing the file directly
patch do
url "https://github.com/roshan/rust-bash-completion/commit/932e9bb4e9f28c2785de2b8db6f0e8c050f4f9be.diff"
sha256 "0d5f4762bd93ffe09ee86c6ffffc850337ee69a8a54049c8b29a113468b39618"
end
end
bottle :unneeded
def install
bash_completion.install "etc/bash_completion.d/rustc"
end
test do
assert_match "-F _rustc",
shell_output("source #{bash_completion}/rustc && complete -p rustc")
end
end