dots/stow/.config/fish/functions/0x0.fish

9 lines
290 B
Fish

function 0x0 --description 'Uploads a file or folder to 0x0.st'
if test -d "$argv"
set TMPFILE "$(mktemp --suffix '.tar')"
tar cvf "$TMPFILE" "$argv"
curl -F file="@$TMPFILE" -F expires=24 https://0x0.st
else
curl -F file=@"$argv" -F expires=24 https://0x0.st
end
end