From 0b2abd07035502f3ed9def6249057cf03747c437 Mon Sep 17 00:00:00 2001 From: Gregor Trefs Date: Mon, 13 Mar 2017 14:37:32 +0100 Subject: [PATCH] Added plugin octozen --- plugins/octozen/README.md | 5 +++++ plugins/octozen/octozen.plugin.zsh | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 plugins/octozen/README.md create mode 100644 plugins/octozen/octozen.plugin.zsh diff --git a/plugins/octozen/README.md b/plugins/octozen/README.md new file mode 100644 index 00000000..e878b73a --- /dev/null +++ b/plugins/octozen/README.md @@ -0,0 +1,5 @@ +# Octozen plugin + +Displays a zen quote of octocat on start up. + +Internet connection is required. diff --git a/plugins/octozen/octozen.plugin.zsh b/plugins/octozen/octozen.plugin.zsh new file mode 100644 index 00000000..18ce03eb --- /dev/null +++ b/plugins/octozen/octozen.plugin.zsh @@ -0,0 +1,13 @@ +# octozen plugin + +# Displays a zen from octocat +# +function display_octozen() { + local command="curl -s https://api.github.com/octocat" + local zen=$(eval ${command}) + if [ "$zen" != "" ]; then + printf '%s\n' ${zen} + fi +} + +display_octozen