class DjangoCompletion < Formula desc "Bash completion for Django" homepage "https://www.djangoproject.com/" url "https://github.com/django/django/archive/4.1.5.tar.gz" sha256 "999d0c3c295974def9fa5b19b5cee26088629c226fe8a7723f6378b19669e843" license "BSD-3-Clause" head "https://github.com/django/django.git", branch: "main" livecheck do url :stable regex(/^v?(\d+(?:\.\d+)+)$/i) end bottle do sha256 cellar: :any_skip_relocation, all: "b97bfc696c0e0e7c65fe7965af3a05e31dc92b158c8314f0af2330760a2c7b94" end def install bash_completion.install "extras/django_bash_completion" => "django" end test do assert_match "-F _django_completion", shell_output("bash -c 'source #{bash_completion}/django && complete -p django-admin'") end end