zsh-history-substring-search: add caveat and test (#13567)
This commit is contained in:
parent
c4ef72100a
commit
a17a49033b
1 changed files with 18 additions and 2 deletions
|
@ -7,7 +7,23 @@ class ZshHistorySubstringSearch < Formula
|
|||
bottle :unneeded
|
||||
|
||||
def install
|
||||
inreplace "README.md", "source zsh-history", "source #{opt_prefix}/zsh-history"
|
||||
prefix.install Dir["*.zsh"]
|
||||
pkgshare.install "zsh-history-substring-search.zsh"
|
||||
end
|
||||
|
||||
def caveats
|
||||
<<-EOS.undent
|
||||
To activate the history search, add the following at the end of your .zshrc:
|
||||
|
||||
source #{HOMEBREW_PREFIX}/share/zsh-history-substring-search/zsh-history-substring-search.zsh
|
||||
|
||||
You will also need to force reload of your .zshrc:
|
||||
|
||||
source ~/.zshrc
|
||||
EOS
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "i",
|
||||
shell_output("zsh -c '. #{pkgshare}/zsh-history-substring-search.zsh && echo $HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS'")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue