homebrew-core/Formula/zsh-autosuggestions.rb
2018-11-27 18:32:47 -05:00

29 lines
844 B
Ruby

class ZshAutosuggestions < Formula
desc "Fish-like fast/unobtrusive autosuggestions for zsh"
homepage "https://github.com/zsh-users/zsh-autosuggestions"
url "https://github.com/zsh-users/zsh-autosuggestions/archive/v0.5.0.tar.gz"
sha256 "3067774d3129fa3220f7010d79ee735d1bbea0a07b6bf32c5b38dd37188538d9"
bottle :unneeded
def install
pkgshare.install "zsh-autosuggestions.zsh"
end
def caveats
<<~EOS
To activate the autosuggestions, add the following at the end of your .zshrc:
source #{HOMEBREW_PREFIX}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
You will also need to force reload of your .zshrc:
source ~/.zshrc
EOS
end
test do
assert_match "history",
shell_output("zsh -c '. #{pkgshare}/zsh-autosuggestions.zsh && echo $ZSH_AUTOSUGGEST_STRATEGY'")
end
end