jackett 0.22.1382
[Homebrew/homebrew-core.git] / Formula / z / zsh-autopair.rb
blobe9e60dd3b5ce37ca3b05db4179cc036bc864ef06
1 class ZshAutopair < Formula
2   desc "Auto-close and delete matching delimiters in zsh"
3   homepage "https://github.com/hlissner/zsh-autopair"
4   url "https://github.com/hlissner/zsh-autopair/archive/refs/tags/v1.0.tar.gz"
5   sha256 "4b6f4d20d89ea08fd239089ad4133cff5ebdb71f07f589d5e41d0814d4cf4165"
6   license "MIT"
8   bottle do
9     rebuild 1
10     sha256 cellar: :any_skip_relocation, all: "c9208ef9b9a923475ace7d3c397458eded12a4d8bb3961276d4196cc10329a0d"
11   end
13   uses_from_macos "zsh" => :test
15   def install
16     pkgshare.install "autopair.zsh"
17   end
19   def caveats
20     <<~EOS
21       To activate autopair, add the following at the end of your .zshrc:
23         source #{HOMEBREW_PREFIX}/share/zsh-autopair/autopair.zsh
25       You will also need to restart your terminal for this change to take effect.
26     EOS
27   end
29   test do
30     zsh_command = "source #{pkgshare}/autopair.zsh && echo $AUTOPAIR_PAIRS"
31     assert_match "\" } ' ) ] `", shell_output("zsh -c '#{zsh_command}'")
32   end
33 end