From b79fba7b0d38aa61afaeeaaa7fab6992dbfb6db3 Mon Sep 17 00:00:00 2001 From: Gregor Trefs Date: Tue, 10 Aug 2021 21:02:06 +0200 Subject: feat(plugins): `octozen` shows an Octocat zen quote on startup (#5959) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Marc Cornellà --- plugins/octozen/octozen.plugin.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 plugins/octozen/octozen.plugin.zsh (limited to 'plugins/octozen/octozen.plugin.zsh') diff --git a/plugins/octozen/octozen.plugin.zsh b/plugins/octozen/octozen.plugin.zsh new file mode 100644 index 000000000..71ee550a5 --- /dev/null +++ b/plugins/octozen/octozen.plugin.zsh @@ -0,0 +1,11 @@ +# octozen plugin + +# Displays a zen quote from octocat +function display_octozen() { + curl -m 2 -fsL "https://api.github.com/octocat" + add-zsh-hook -d precmd display_octozen +} + +# Display the octocat on the first precmd, after the whole starting process has finished +autoload -Uz add-zsh-hook +add-zsh-hook precmd display_octozen -- cgit v1.2.3-70-g09d2