homebrew-core/Formula/zsh-you-should-use.rb

33 lines
912 B
Ruby

class ZshYouShouldUse < Formula
desc "ZSH plugin that reminds you to use existing aliases for commands you just typed"
homepage "https://github.com/MichaelAquilina/zsh-you-should-use"
url "https://github.com/MichaelAquilina/zsh-you-should-use/archive/1.7.3.tar.gz"
sha256 "db4486cd12974332ec858d446aff9393dae6be430d425a56d7036d2ce4edeb9e"
license "GPL-3.0-or-later"
bottle :unneeded
def install
pkgshare.install "you-should-use.plugin.zsh"
end
def caveats
<<~EOS
To activate You Should Use, add the following to your .zshrc:
source #{HOMEBREW_PREFIX}/share/zsh-you-should-use/you-should-use.plugin.zsh
You will also need to force reload of your .zshrc:
source ~/.zshrc
EOS
end
test do
assert_match version.to_s,
shell_output("zsh -c '. #{pkgshare}/you-should-use.plugin.zsh && " \
"echo $YSU_VERSION'")
end
end