]> Pileus Git - vpaste/commitdiff
(no commit message)
authorAndy Spencer <andy753421@gmail.com>
Thu, 8 Oct 2009 06:04:38 +0000 (06:04 +0000)
committerAndy Spencer <andy753421@gmail.com>
Thu, 8 Oct 2009 06:04:38 +0000 (06:04 +0000)
index.cgi
vpaste

index a9f2465d54469bfbfb7cf2d8d10aba2768b0d917..c5482204103c0ff2f5087b399a2baf9bfe6139b6 100755 (executable)
--- a/index.cgi
+++ b/index.cgi
@@ -140,6 +140,9 @@ cat - <<EOF
                <pre> &lt;command&gt; | vpaste [option=value,..]</pre>
                <br>
                <pre> &lt;command&gt; | curl -F 'x=<-' $SCRIPT_URI[?option=value,..]</pre>
                <pre> &lt;command&gt; | vpaste [option=value,..]</pre>
                <br>
                <pre> &lt;command&gt; | curl -F 'x=<-' $SCRIPT_URI[?option=value,..]</pre>
+               <br>
+               <pre>:map vp :exec "w !vpaste ft=".&ft&lt;CR&gt;</pre>
+               <pre>:vmap vp &lt;ESC&gt;:exec "'&lt;,'&gt;w !vpaste ft=".&ft&lt;CR&gt;</pre>
 
                <h4>DESCRIPTION</h4>
                <p>Add <b>?[option[=value],..]</b> to make your text a rainbow.</p>
 
                <h4>DESCRIPTION</h4>
                <p>Add <b>?[option[=value],..]</b> to make your text a rainbow.</p>
diff --git a/vpaste b/vpaste
index 0e873237d87a21039c6a9c357caeba52b5c50180..a24d02c49794bf4c65ffde6cba323cf602e9d3e5 100755 (executable)
--- a/vpaste
+++ b/vpaste
@@ -1,9 +1,9 @@
 #!/bin/bash
 uri="http://andy753421.ath.cx/vpaste/"
 if [ -f "$1" ]; then
 #!/bin/bash
 uri="http://andy753421.ath.cx/vpaste/"
 if [ -f "$1" ]; then
-       out=$(curl -F "x=<$1" "$uri?$2")
+       out=$(curl -s -F "x=<$1" "$uri?$2")
 else
 else
-       out=$(curl -F 'x=<-' "$uri?$1")
+       out=$(curl -s -F 'x=<-' "$uri?$1")
 fi
 echo "$out"
 if [ -x "`which xclip 2>/dev/null`" -a "$DISPLAY" ]; then
 fi
 echo "$out"
 if [ -x "`which xclip 2>/dev/null`" -a "$DISPLAY" ]; then