From 14c12d4285ef4271dbdff767bd67d7069acb259f Mon Sep 17 00:00:00 2001 From: Ali Ismayilov Date: Wed, 23 Jul 2014 11:47:46 -0300 Subject: [PATCH] Add uplio plugin --- plugins/uplio/README.md | 5 +++++ plugins/uplio/uplio.plugin.zsh | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 plugins/uplio/README.md create mode 100644 plugins/uplio/uplio.plugin.zsh diff --git a/plugins/uplio/README.md b/plugins/uplio/README.md new file mode 100644 index 00000000..6d535f02 --- /dev/null +++ b/plugins/uplio/README.md @@ -0,0 +1,5 @@ +# uplio + +1. Uploads the file to [upl.io](http://upl.io/). +1. Copies url to clipboards. +1. Print the url to the terminal. diff --git a/plugins/uplio/uplio.plugin.zsh b/plugins/uplio/uplio.plugin.zsh new file mode 100644 index 00000000..46438850 --- /dev/null +++ b/plugins/uplio/uplio.plugin.zsh @@ -0,0 +1,13 @@ +# Copied from https://gist.github.com/henrique2010/4a474e036f2f1a7de96f by @henrique2010 +# This command receives a file as param, upload it to upl.io and copy the url to the clipboard +# +# install: copy this code to your .bashrc or .zshrc +# dependencies: curl and xclip +# example: $ upload ~/Images/image.png + +uplio() { + echo 'Uploading...' + url=`curl http://upl.io -F file=@$1 -s` + echo -n $url | pbcopy + echo $url +}