#!/usr/local/bin/andy func upload file { if test $file = '-' { set file /dev/stdin } curl ( --retry-all-errors -X POST -H "Authorization: $TOKEN" -F "data=@$file" https://paste.thomasvoss.com ) } set TOKEN `vlt raw Miscellaneous 'Mpaste (Key)' if test $#args -lt 2 { set args $args - } for $args[1..] { async upload $_ } wait