diff options
4 files changed, 28 insertions, 6 deletions
diff --git a/README.markdown b/README.markdown
index 479988d1..b0f71240 100644
--- a/README.markdown
+++ b/README.markdown
@@ -193,7 +193,6 @@ There are a few other little tricks in `bash/bashrc.d`, including:
* `readz` -- Alias for `read -d '' -r`
* `scr` -- Create a temporary directory and change into it
* `sd` -- Switch to a sibling directory
-* `sprunge` -- Pastebin frontend tool I pilfered from `#bash` on Freenode
* `ud` -- Change into an indexed ancestor of a directory
I also wrap a few command calls with functions to stop me from doing silly
@@ -326,6 +325,7 @@ Installed by the `install-bin` target:
* `plmu(1)` retrieves a list of installed modules from
[`plenv`](https://github.com/tokuhirom/plenv), filters out any modules in
`~/.plenv/non-cpan-modules`, and updates them all.
+* `spr(1)` posts its input to the sprunge.us pastebin.
* `stbl(1)` strips a trailing blank line from the files in its arguments.
* `sue(8)` execs `sudoedit(8)` as the owner of all the file arguments given,
perhaps in cases where you may not necessarily have `root` `sudo(8)`
diff --git a/bash/bashrc.d/sprunge.bash b/bash/bashrc.d/sprunge.bash
deleted file mode 100644
index 34406b0d..00000000
--- a/bash/bashrc.d/sprunge.bash
+++ /dev/null
@@ -1,5 +0,0 @@
-# #bash on Freenode use their own pastebin. This is a convenience function for
-# posting code to it. <http://sprunge.us>
-sprunge() {
- curl -F 'sprunge=<-' http://sprunge.us < "${1:-/dev/stdin}"
diff --git a/bin/spr b/bin/spr
new file mode 100755
index 00000000..026ba359
--- /dev/null
+++ b/bin/spr
@@ -0,0 +1,4 @@
+# Convenience script for posting to sprunge.us pastebin
+cat "${@:-}" |
+curl -F 'sprunge=<-' http://sprunge.us/
diff --git a/man/man1/spr.1 b/man/man1/spr.1
new file mode 100644
index 00000000..1039ae4b
--- /dev/null
+++ b/man/man1/spr.1
@@ -0,0 +1,23 @@
+.TH SPR 1 "July 2016" "Manual page for spr"
+.B spr
+\- post input to sprunge.us pastebin and print the URL to stdout
+.B spr
+.B spr
+file1 file2 file3
+declare -p |
+.B spr
+.B spr
+uses curl(1) to make an HTTP POST request submitting all of its input (whether
+files or stdin) to the sprunge.us pastebin.
+Tom Ryder <tom@sanctum.geek.nz>