Added a log for sprunge links. No need to re-make them anymore :D Well, unless you have updated it.

This commit is contained in:
James McGlashan 2011-12-11 01:21:53 +11:00
commit 630295efc8

View file

@ -43,6 +43,7 @@ sprunge() {
# read from stdin
url=$(curl -s -F 'sprunge=<-' http://sprunge.us <& 0)
urls=(${url//[[:space:]]})
echo "stdin: $url"
else
# treat arguments as a list of files to upload
for file in $@; do
@ -56,14 +57,14 @@ sprunge() {
url=${url//[[:space:]]}
[[ $syntax != text ]] && url=${url}?${syntax}
echo "$file: $url" >> $OMZ/sprunge.log
urls+=(${url})
done
fi
# output each url on its own line
for url in $urls
echo $url && echo $url >> "$OMZ/sprunge.log"
echo $url
# don't copy to clipboad if piped
[[ -t 1 ]] && sendtoclip $urls