diff options
| author | 2020-02-14 19:11:04 -0500 | |
|---|---|---|
| committer | 2020-02-14 19:11:04 -0500 | |
| commit | 0d9a5a245a7be7e444d7f34e959dd06cb7b053e0 (patch) | |
| tree | 3d42142e6ee22dbb72683e0b3549216f17bb6629 /dot_local/share/toasty/functions/brpaste | |
| parent | zsh: remove toasty (preparation for git subtree) (diff) | |
| parent | Squashed 'dot_local/share/toasty/' content from commit aee4da7 (diff) | |
Merge commit '858a4a31a251d0eab21dffb96776aca007dafb07' as 'dot_local/share/toasty'
Diffstat (limited to 'dot_local/share/toasty/functions/brpaste')
| -rw-r--r-- | dot_local/share/toasty/functions/brpaste | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dot_local/share/toasty/functions/brpaste b/dot_local/share/toasty/functions/brpaste new file mode 100644 index 0000000..b4cf5ef --- /dev/null +++ b/dot_local/share/toasty/functions/brpaste @@ -0,0 +1,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" |
