X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fsprunge%2Fsprunge.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fsprunge%2Fsprunge.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=48dff5837c6218fd2f0dc3b1a31b45d6e9adb34d;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/sprunge/sprunge.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/sprunge/sprunge.plugin.zsh deleted file mode 100644 index 48dff58..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/sprunge/sprunge.plugin.zsh +++ /dev/null @@ -1,52 +0,0 @@ -sprunge() { - if [[ "$1" = --help ]]; then - fmt -s >&2 << EOF - -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 arguments. For 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. - -EOF - return - fi - - if [ -t 0 ]; then - echo Running interactively, checking for arguments... >&2 - if [ "$*" ]; then - echo Arguments present... >&2 - if [ -f "$*" ]; then - echo Uploading the contents of "$*"... >&2 - cat "$*" - else - echo Uploading the text: \""$*"\"... >&2 - echo "$*" - fi | curl -F 'sprunge=<-' http://sprunge.us - else - echo No arguments found, printing USAGE and exiting. >&2 - sprunge --help - return 1 - fi - else - echo Using input from a pipe or STDIN redirection... >&2 - curl -F 'sprunge=<-' http://sprunge.us - fi -}