sprunge command has a setting!

This commit is contained in:
Colin Shea 2011-11-27 03:51:35 -07:00
commit d973665df0

View file

@ -1,8 +1,17 @@
# A simple alias for sprunge, but only if there isn't a smarter, better one out
# there in $PATH
# Smart sprunge alias/script.
#
# A good one to add is the sprunge script in this directory.
# To add the sprunge script to your path, add this to your .zshrc file:
#
# zstyle :omz:plugins:sprunge add-path on
#
# Otherwise, a simple alias for sprunge, but only if there isn't a smarter,
# better one out there in $PATH, will be added.
if [ -z "${commands[sprunge]}" ]; then
zstyle -b :omz:plugins:sprunge add-path _plugin__path
if [[ ${_plugin__path} == "on" ]]; then
# Plugin setting: Add this plugin directory to the path
export PATH=$PATH:$ZSH/plugins/sprunge
elif [ -z "${commands[sprunge]}" ]; then
# Nope. No `sprunge` command, period. So, dumb/simple alias, here we go!
alias sprunge="curl -F 'sprunge=<-' http://sprunge.us/"
fi