summaryrefslogtreecommitdiff
path: root/plugins/sprunge/README.md
diff options
context:
space:
mode:
authorNoah Nichols <noahjacknichols@gmail.com>2019-10-09 11:51:47 -0400
committerMarc Cornellà <marc.cornella@live.com>2019-10-09 17:51:47 +0200
commitabc05fa422a183e974df9faefc61a8512abe1db9 (patch)
treeab2adbc3bca71c431d69a24eb7a31005f13f0474 /plugins/sprunge/README.md
parent8bb9b044699f5c96830c7fe2bb78de19854d4973 (diff)
downloadzsh-abc05fa422a183e974df9faefc61a8512abe1db9.tar.gz
zsh-abc05fa422a183e974df9faefc61a8512abe1db9.tar.bz2
zsh-abc05fa422a183e974df9faefc61a8512abe1db9.zip
sprunge: add README and refactor (#8239)
Co-authored-by: Marc Cornellà <marc.cornella@live.com>
Diffstat (limited to 'plugins/sprunge/README.md')
-rw-r--r--plugins/sprunge/README.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/plugins/sprunge/README.md b/plugins/sprunge/README.md
new file mode 100644
index 000000000..2a363d3bd
--- /dev/null
+++ b/plugins/sprunge/README.md
@@ -0,0 +1,31 @@
+# Sprunge plugin
+
+This plugin uploads data and fetch URL from the pastebin http://sprunge.us
+
+To enable it, add 'sprunge' to your plugins:
+```
+plugins=(... sprunge)
+```
+
+## Usage
+
+| Command | Description |
+|------------------------------|-------------------------------------------|
+| `sprunge filename.txt` | Uploads filename.txt |
+| `sprunge "this is a string"` | Uploads plain text |
+| `sprunge < filename.txt` | Redirects filename.txt content to sprunge |
+| `echo data \| sprunge` | Any piped data will be uploaded |
+
+Once sprunge has processed the input it will give you a unique HTTP address:
+```
+$ sprunge "hello"
+http://sprunge.us/XxjnKz
+```
+
+## Notes
+
+- Sprunge accepts piped data, stdin redirection, text strings as input or filenames.
+ Only one of these can be used at a time.
+- Argument precedence goes as follows: stdin > piped input > text strings.
+- If a filename is mispelled or doesn't have the necessary path description, it will NOT
+ generate an error, but instead treat it as a text string.