From ed0c63e33f882366dfc0019ff4a85b7c869a3645 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Thu, 2 Oct 2014 20:26:19 -0700 Subject: [PATCH 1/3] Start writing an antigen plugin file --- README.md | 2 ++ blackbox.plugin.zsh | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100755 blackbox.plugin.zsh diff --git a/README.md b/README.md index 524acc0..f0f7bc7 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,8 @@ You'll want to include blackbox's "bin" directory in your PATH: export PATH=$PATH:/the/path/to/blackbox/bin ``` +If you're using antigen, adding `antigen bundle StackExchange/blackbox` to +your .zshrc will download this repository and add it to your $PATH. ### For the first user, create a GPG key and add it to the key ring. diff --git a/blackbox.plugin.zsh b/blackbox.plugin.zsh new file mode 100755 index 0000000..a7f850d --- /dev/null +++ b/blackbox.plugin.zsh @@ -0,0 +1,31 @@ +#!/bin/zsh +# The MIT License (MIT) + +# Copyright (c) 2014 Stack Exchange, Inc. + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +# Make it easy to install with antigen and other frameworks that can cope +# with antigen/oh-my-zsh bundles +# +# antigen bundle StackExchange/blackbox + +# Add our plugin's bin diretory to user's path +PLUGIN_BIN="$(dirname $0)/bin" +export PATH=${PATH}:${PLUGIN_BIN} From 01bad6b2ee758c61e8cc5bb4681a84f112dc9437 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Fri, 3 Oct 2014 13:10:00 -0700 Subject: [PATCH 2/3] Add name of initialize script --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index f0f7bc7..2b37181 100644 --- a/README.md +++ b/README.md @@ -325,6 +325,7 @@ To add "blackbox" to a git or mercurial repo, you'll need to do the following: You'll want to include blackbox's "bin" directory in your PATH: ``` export PATH=$PATH:/the/path/to/blackbox/bin +blackbox_initialize ``` If you're using antigen, adding `antigen bundle StackExchange/blackbox` to From 974aaba88514b81b39e42bbbed1a289f222abf8a Mon Sep 17 00:00:00 2001 From: Joe Block Date: Mon, 6 Oct 2014 10:46:36 -0700 Subject: [PATCH 3/3] Make sure path assignment is space friendly per @tomontime's feedback --- blackbox.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blackbox.plugin.zsh b/blackbox.plugin.zsh index a7f850d..a1017ab 100755 --- a/blackbox.plugin.zsh +++ b/blackbox.plugin.zsh @@ -28,4 +28,4 @@ # Add our plugin's bin diretory to user's path PLUGIN_BIN="$(dirname $0)/bin" -export PATH=${PATH}:${PLUGIN_BIN} +export PATH="${PATH}:${PLUGIN_BIN}"