27 lines
821 B
Ruby
27 lines
821 B
Ruby
class BashPreexec < Formula
|
|
desc "Bash preexec and precmd functions (like Zsh)"
|
|
homepage "https://github.com/rcaloras/bash-preexec"
|
|
url "https://github.com/rcaloras/bash-preexec/archive/0.3.7.tar.gz"
|
|
sha256 "56c33779763f9960dee863f4d87bc58f8da0ad9120b2c60dd12ba61c71c72da4"
|
|
license "MIT"
|
|
head "https://github.com/rcaloras/bash-preexec.git"
|
|
|
|
bottle :unneeded
|
|
|
|
def install
|
|
(prefix/"etc/profile.d").install "bash-preexec.sh"
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
Add the following line to your bash profile (e.g. ~/.bashrc, ~/.profile, or ~/.bash_profile)
|
|
[ -f #{etc}/profile.d/bash-preexec.sh ] && . #{etc}/profile.d/bash-preexec.sh
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
# Just testing that the file is installed
|
|
assert_predicate testpath/"#{prefix}/etc/profile.d/bash-preexec.sh", :exist?
|
|
end
|
|
end
|