homebrew-core/Formula/vagrant-completion.rb

23 lines
761 B
Ruby

class VagrantCompletion < Formula
desc "Bash completion for Vagrant"
homepage "https://github.com/hashicorp/vagrant"
url "https://github.com/hashicorp/vagrant/archive/v2.3.2.tar.gz"
sha256 "76d3737e273fa73501f7c12a4814f6a63851b8119118575cc77e9911ce3acb06"
license "MIT"
head "https://github.com/hashicorp/vagrant.git", branch: "main"
bottle do
sha256 cellar: :any_skip_relocation, all: "b8e12b71cbd3a1a5390d59700cd7a3b1377ac544c4b0eade5b76f0e15a6801e6"
end
def install
bash_completion.install "contrib/bash/completion.sh" => "vagrant"
zsh_completion.install "contrib/zsh/_vagrant"
end
test do
assert_match "-F _vagrant",
shell_output("bash -c 'source #{bash_completion}/vagrant && complete -p vagrant'")
end
end