From 69c6c04f647f0552859172ac4842bb5ffcdaee0c Mon Sep 17 00:00:00 2001 From: Simon Gomizelj Date: Tue, 29 Nov 2011 12:25:39 -0500 Subject: [PATCH] Updated documentation. --- README.md | 7 ++-- plugins/sprunge/README.md | 52 +++++++++++------------------- plugins/sprunge/sprunge.plugin.zsh | 38 ++++------------------ 3 files changed, 28 insertions(+), 69 deletions(-) diff --git a/README.md b/README.md index 01c786242..c8ac184ef 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,6 @@ install it: $ cower -dd oh-my-zsh-git ``` - [zsh]: http://www.zsh.org/ - [oh-my-zsh-git]: https://aur.archlinux.org/packages.php?ID=54375 - [cower]: https://github.com/falconindy/cower - The user must have zsh set as their shell. ``` @@ -65,4 +61,7 @@ Resources The [refcard][] is pretty tasty for tips. + [zsh]: http://www.zsh.org/ + [oh-my-zsh-git]: https://aur.archlinux.org/packages.php?ID=54375 + [cower]: https://github.com/falconindy/cower [refcard]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf diff --git a/plugins/sprunge/README.md b/plugins/sprunge/README.md index 480707e84..d2326f7a3 100644 --- a/plugins/sprunge/README.md +++ b/plugins/sprunge/README.md @@ -1,39 +1,25 @@ -# sprunge alias +Sprunge +======= -This plugin adds at least an alias to zsh. However, you can use the smarter -script, provided as part of the plugin, instead. To enable it, add the following -to your `.zshrc`: +This plugin adds powerful sprunge functionality to zsh. The script +optionally requires pygments with python >= 2.7 and either xclip or +xsel. Pygments is used to detect what language you have uploaded. If +it is detected, the url will automatically append the url with an +appropriate with `?lang`. Xclip or xsel are used to copy the urls to +the primary and secondary clipboards. - zstyle :omz:plugins:sprunge add-path on +Usage +----- -The plugin will modify your path, adding `$ZSH/plugins/sprunge` to the end of -it. This plugin presumes you set `$ZSH` to the directory where oh-my-zsh is -installed to. This is the default if you used the template zshrc. +You can call `sprunge` in any of the following ways: -# Note + sprunge [files] + sprunge < file + piped_data | sprunge -The plugin does not overwrite anything. If you had an alias, or there is another -binary in your system that is called 'sprunge', this plugin will do **nothing**. +Copyright & License +------------------- -The script also depends on pygments, and python >= 2.7. Pygments is used to -detect what language you have uploaded. If it is detected, the url will -automatically be appended with `?lang`, where 'lang' is language. - -## Usage - -If you let the plugin add the sprunge script to your $PATH, you can call -`sprunge` in any of the following ways: - - sprunge filename.txt - sprunge < filename.txt - piped_data | sprunge - -Otherwise, the alias defined by the script can only be called the following way: - - piped_data | sprunge - -# Copyright & License - -This plugin is released under the MIT license. The script is presumed to be -released into the public domain, as the original announcement had no explicit -announcement. +This plugin is released under the MIT license. The script is presumed +to be released into the public domain, as the original announcement +had no explicit announcement. diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index fed20d16f..71b784bd9 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -11,39 +11,13 @@ DESCRIPTION Upload data and fetch URL from the pastebin http://sprunge.us In addition to printing the returned URL, if the xset or xsel - programs are available (on $PATH), the URL will also be copied to the - PRIMARY selection and the CLIPBOARD selection (allowing to quickly - paste the url into IRC client for example). + programs are available, the URL will also be copied to the + PRIMARY selection and the CLIPBOARD selection. USAGE - $0 filename.txt - $0 < filename.txt - piped_data | $0 - -INPUT METHODS - $0 can accept piped data, STDIN redirection [