aboutsummaryrefslogtreecommitdiffstats
path: root/ix
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-03-31 12:15:03 +0100
committerMatthew Lemon <y@yulqen.org>2023-03-31 12:15:03 +0100
commit59fe964217ab2785aa19088f257559cafcb7d713 (patch)
tree083495da943849ddc1978139fed3387a8e9eb2f4 /ix
parent2d7340f61037df83eb82318fe88dcbe44b2ae673 (diff)
added ix pastebin command - from rwxrob
Diffstat (limited to '')
-rwxr-xr-xix14
1 files changed, 14 insertions, 0 deletions
diff --git a/ix b/ix
new file mode 100755
index 0000000..9911d4d
--- /dev/null
+++ b/ix
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# The world's best pastebin terminal replacement. I'm so in love. You
+# can call this from *within* vi!
+
+if [ -n "$1" ]; then
+ exec curl -s "ix.io/$1"
+fi
+
+url=$(curl -s -F 'f:1=<-' http://ix.io)
+wee "$url" 2>/dev/null
+echo "$url"
+which xclip >/dev/null || exit 0
+echo "$url" | xclip