diff --git a/Formula/mpc.rb b/Formula/mpc.rb index e7be64a474..a1d0ffed7d 100644 --- a/Formula/mpc.rb +++ b/Formula/mpc.rb @@ -20,9 +20,13 @@ class Mpc < Formula system "meson", "--prefix=#{prefix}", ".", "output" system "ninja", "-C", "output" system "ninja", "-C", "output", "install" + + bash_completion.install "contrib/mpc-completion.bash" => "mpc" + rm share/"doc/mpc/contrib/mpc-completion.bash" end test do assert_match "query", shell_output("#{bin}/mpc list 2>&1", 1) + assert_match "-F _mpc", shell_output("source #{bash_completion}/mpc && complete -p mpc") end end