diff options
| author | Kozlov Alexander <badryke@gmail.com> | 2018-11-16 13:38:43 +0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-16 13:38:43 +0300 | 
| commit | 8c95c52353118643ac3dbd9b0c185a3129b84bf8 (patch) | |
| tree | ee7497251b7a541480ae5c6a97b63b14381ed5ee /plugins/sprunge | |
| parent | dd30cf104c9ca42d89d26a134382ca421869ce7e (diff) | |
| parent | 3d8f2bda599c8c6d160dc448e5ab28aaf2d5e90d (diff) | |
| download | zsh-8c95c52353118643ac3dbd9b0c185a3129b84bf8.tar.gz zsh-8c95c52353118643ac3dbd9b0c185a3129b84bf8.tar.bz2 zsh-8c95c52353118643ac3dbd9b0c185a3129b84bf8.zip | |
Merge branch 'master' into master
Diffstat (limited to 'plugins/sprunge')
| -rw-r--r-- | plugins/sprunge/sprunge.plugin.zsh | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index fcc9004f8..e1c89b729 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -1,40 +1,40 @@  # Contributed and SLIGHTLY modded by Matt Parnell/ilikenwf <parwok -at- gmail>  # Created by the blogger at the URL below...I don't know where to find his/her name -# Original found at http://www.shellperson.net/sprunge-pastebin-script/ -  +# Original found at https://www.shellperson.net/sprunge-pastebin-script/ +  usage() {  description | fmt -s >&2  } -  +  description() {  cat << HERE -  +  DESCRIPTION    Upload data and fetch URL from the pastebin http://sprunge.us -  +  USAGE    $0 filename.txt    $0 text string    $0 < filename.txt    piped_data | $0 -  +  NOTES  --------------------------------------------------------------------------  * INPUT METHODS *  $0 can accept piped data, STDIN redirection [<filename.txt], text strings following the command as arguments, or filenames as arguments.  Only one of these methods can be used at a time, so please see the note on precedence.  Also, note that using a pipe or STDIN redirection will treat tabs as spaces, or disregard them entirely (if they appear at the beginning of a line).  So I suggest using a filename as an argument if tabs are important either to the function or readability of the code. -  +  * PRECEDENCE *  STDIN redirection has precedence, then piped input, then a filename as an argument, and finally text strings as an arguments. -  +    EXAMPLE:    echo piped | "$0" arguments.txt < stdin_redirection.txt -  +  In this example, the contents of file_as_stdin_redirection.txt would be uploaded. Both the piped_text and the file_as_argument.txt are ignored. If there is piped input and arguments, the arguments will be ignored, and the piped input uploaded. -  +  * FILENAMES *  If a filename is misspelled or doesn't have the necessary path description, it will NOT generate an error, but will instead treat it as a text string and upload it.  -------------------------------------------------------------------------- -  +  HERE  exit  } | 
