dotfiles/fish/functions/transfer.fish

8 lines
325 B
Fish
Raw Normal View History

2022-09-02 08:49:41 +02:00
function transfer --description 'Sube un arquivo a transfer.tr4ck.net'
if [ $argv[1] ]
wget -t 1 -qO - --method=PUT --body-file="$argv[1]" --header="Content-Type: (file -b --mime-type $argv[1])" https://transfer.tr4ck.net/(basename $argv[1])
else
echo 'uso: transfer ARQUIVO_A_TRANSFERIR'
end
end