From 6040d72e2a438529f5850b68d1a87d54a3c96f45 Mon Sep 17 00:00:00 2001 From: "Thomas (nezza-_-) Roth" Date: Mon, 16 Jan 2012 12:20:06 +0100 Subject: [PATCH 1/2] Fix the behaviour of the sprunge plugin so that is preserves whitespaces and tabs. --- plugins/sprunge/sprunge.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index 9f9432ac..e542b437 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -57,7 +57,7 @@ sprunge() { fi else echo Using input from a pipe or STDIN redirection... >&2 - while read -r line ; do + while IFS= read -r line ; do echo $line done | curl -F 'sprunge=<-' http://sprunge.us fi From 54a30c470145be2d7aa055bc7a05815ce051d540 Mon Sep 17 00:00:00 2001 From: "Thomas (nezza-_-) Roth" Date: Mon, 16 Jan 2012 13:26:08 +0100 Subject: [PATCH 2/2] sprunge-plugin: Remove the unnecessary while loop. --- plugins/sprunge/sprunge.plugin.zsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/sprunge/sprunge.plugin.zsh b/plugins/sprunge/sprunge.plugin.zsh index e542b437..fcc9004f 100644 --- a/plugins/sprunge/sprunge.plugin.zsh +++ b/plugins/sprunge/sprunge.plugin.zsh @@ -57,8 +57,6 @@ sprunge() { fi else echo Using input from a pipe or STDIN redirection... >&2 - while IFS= read -r line ; do - echo $line - done | curl -F 'sprunge=<-' http://sprunge.us + curl -F 'sprunge=<-' http://sprunge.us fi }