diff --git a/Formula/launchctl-completion.rb b/Formula/launchctl-completion.rb new file mode 100644 index 00000000000..56c282a9714 --- /dev/null +++ b/Formula/launchctl-completion.rb @@ -0,0 +1,17 @@ +class LaunchctlCompletion < Formula + desc "Bash completion for Launchctl" + homepage "https://github.com/CamJN/launchctl-completion" + url "https://github.com/CamJN/launchctl-completion/archive/v1.0.tar.gz" + sha256 "b21c39031fa41576d695720b295dce57358c320964f25d19a427798d0f0df7a0" + + bottle :unneeded + + def install + bash_completion.install "launchctl-completion.sh" => "launchctl" + end + + test do + assert_match "-F _launchctl", + shell_output("bash -c 'source #{bash_completion}/launchctl && complete -p launchctl'") + end +end