You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
416 B
Fish
12 lines
416 B
Fish
6 years ago
|
function transfer --description 'Upload a file to transfer.sh'
|
||
|
if [ $argv[1] ]
|
||
|
# write to output to tmpfile because of progress bar
|
||
|
set -l tmpfile ( mktemp -t transferXXX )
|
||
|
curl --progress-bar --upload-file "$argv[1]" https://transfer.sh/(basename $argv[1]) >> $tmpfile
|
||
|
cat $tmpfile
|
||
|
command rm -f $tmpfile
|
||
|
else
|
||
|
echo 'usage: transfer FILE_TO_TRANSFER'
|
||
|
end
|
||
|
end
|