From e584cf2f7d5c79edd755c5e49dfbf97a831f346e Mon Sep 17 00:00:00 2001 From: Colin Shea Date: Sun, 27 Nov 2011 03:28:13 -0700 Subject: [PATCH] Revert merging the functions together. Silly me. Instead, make it statically wrapped. Why not? Why call `fmt`! Trying to be 'cool'? --- plugins/sprunge/sprunge.plugin.zsh | 77 +++++++++++++++++------------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index 87b20e924..9bea79eb9 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -1,10 +1,50 @@ # Contributed and SLIGHTLY modded by Matt Parnell/ilikenwf # Created by the blogger at the URL below...I don't know where to find his/her name # Original found at http://www.shellperson.net/sprunge-pastebin-script/ -# -# Modified by Evaryont to: -# - Detect syntax via pygments -# - Behave nicely as a plugin + +usage() { + cat << HERE + +DESCRIPTION + Upload data and fetch URL from the pastebin http://sprunge.us + +USAGE + $0 filename.txt + $0 < filename.txt + piped_data | $0 + +INPUT METHODS + +$0 can accept piped data, STDIN redirection [&2 - return 0 + usage fi else syntax="text" # We're dumb in this mode. So, dumb syntax highlighting!