carat.sh: add -w option, change default behavior
authorColin Patrick Mccabe <cmccabe@alumni.cmu.edu>
Wed, 20 Nov 2013 18:08:59 +0000 (10:08 -0800)
committerColin Patrick Mccabe <cmccabe@alumni.cmu.edu>
Wed, 20 Nov 2013 18:08:59 +0000 (10:08 -0800)
Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>

carat.sh

index 07a68fb..a96b680 100755 (executable)
--- a/carat.sh
+++ b/carat.sh
@@ -15,4 +15,8 @@
 # Colin McCabe
 #
 
-fold -s -w 75 | sed 's/^/> /'
+if [[ "$1" == "-w" ]]; then
+    fold -s -w 75 | sed 's/^/ > /'
+else
+    sed 's/^/ > /'
+fi