tiny sprunge update

This commit is contained in:
James McGlashan 2011-12-21 16:09:02 +11:00
commit f7ff6b6439
2 changed files with 3 additions and 3 deletions

View file

@ -1,4 +1,4 @@
setopt correct_all #setopt correct_all
alias man='nocorrect man' alias man='nocorrect man'
alias mv='nocorrect mv' alias mv='nocorrect mv'

View file

@ -43,7 +43,7 @@ sprunge() {
# read from stdin # read from stdin
url=$(curl -s -F 'sprunge=<-' http://sprunge.us <& 0) url=$(curl -s -F 'sprunge=<-' http://sprunge.us <& 0)
urls=(${url//[[:space:]]}) urls=(${url//[[:space:]]})
echo "stdin: $url" >> $OMZ/sprunge.log [[ -z $url ]] || echo "stdin\t$url" >> $OMZ/sprunge.log
else else
# treat arguments as a list of files to upload # treat arguments as a list of files to upload
for file in $@; do for file in $@; do
@ -57,7 +57,7 @@ sprunge() {
url=${url//[[:space:]]} url=${url//[[:space:]]}
[[ $syntax != text ]] && url=${url}?${syntax} [[ $syntax != text ]] && url=${url}?${syntax}
echo "$file: $url" >> $OMZ/sprunge.log [[ -z $url ]] || echo "$file\t$url" >> $OMZ/sprunge.log
urls+=(${url}) urls+=(${url})
done done
fi fi