4be42239b2
Closes #48736. Signed-off-by: Rui Chen <chenrui333@gmail.com>
29 lines
844 B
Ruby
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.6.4.tar.gz"
|
|
sha256 "0b6e251ced5fd7b5b78ea01f798ecc1b46169743a717567f0ec0a21198a372e8"
|
|
|
|
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
|