-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzsh-transient-prompt@1.rb
39 lines (28 loc) · 1.24 KB
/
zsh-transient-prompt@1.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class ZshTransientPromptAT1 < Formula
desc "Add a transient prompt to your zsh command line. Version 1.x"
homepage "https://github.com/olets/zsh-transient-prompt"
url "https://github.com/olets/zsh-transient-prompt/archive/refs/tags/v1.0.1.tar.gz"
sha256 "bd5742cc5a7405b8a77d2a2dc1721a3e243e54f9ea66bc22cfe8e0faf7651577"
head "https://github.com/olets/zsh-transient-prompt.git", branch: "v1"
def install
pkgshare.install "transient-prompt.zsh-theme"
end
def caveats
<<~EOS
To activate zsh-transient-prompt, add the following at the end of your .zshrc:
source #{HOMEBREW_PREFIX}/share/zsh-transient-prompt/transient-prompt.zsh-theme
If you prefer to manage the package with Homebrew but load it with
a plugin manager, you may be able to load the above path with your
plugin manager.
Then restart zsh. Run:
exec zsh
You have installed the 1.x version of zsh-transient-prompt.
Refer to https://zsh-transient-prompt.olets.dev for more information,
including how to switch to the 'latest' channel.
EOS
end
test do
assert_match "0",
shell_output("zsh -c '. #{pkgshare}/transient-prompt.zsh-theme && [[ -n $TRANSIENT_PROMPT_VERSION ]]; echo $?'")
end
end