summaryrefslogtreecommitdiff
path: root/functions/brpaste
blob: b4cf5ef73b50734bb39d1ad471c5a1577c29dc4c (plain) (blame)
1
2
3
4
5
6
#!/bin/zsh
host='https://brpaste.xyz'
[[ $# -eq 0 ]] && set -- '-'
brpaste_id=$(curl -\#fF "data=<$1" "$host") \
    || { echo 'ERROR: Upload failed!' >&2 && return 1; }
printf '%s/%s\n' "$host" "$brpaste_id"