zsh: allow uploading directories via 0x0 function

This commit is contained in:
Nico 2025-05-03 16:16:01 +10:00
parent 35c77911a3
commit bca296334f

View file

@ -47,7 +47,14 @@ func calc() {
}
func 0x0() {
curl -F file=@$1 https://0x0.st
if [ -d "$1" ];
then
TMPFILE="$(mktemp)"
tar cf "$TMPFILE" "$1"
curl -F file=@$TMPFILE -F expires=24 https://0x0.st
else
curl -F file=@$1 -F expires=24 https://0x0.st
fi
}
# plugins