]> Sergey Matveev's repositories - schwabrak.git/blobdiff - comment
I use print everywhere here
[schwabrak.git] / comment
diff --git a/comment b/comment
index f4784bd1111fcdf084a0c454b792c15ca168f6727ced26c848d2d14a1dc079ff..09025ea9cb0df4134a007aebae49fb19ee434375c918103a8bba3c9d14416a04 100755 (executable)
--- a/comment
+++ b/comment
@@ -13,18 +13,18 @@ comment=issues/$issue/comment
 
 local tmp=`mktemp`
 trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
-$PERL -npe 's/^/# /' < $comment > $tmp
+{ $PERL -npe 's/^/# /' <$comment ; print } >$tmp
 zmodload -F zsh/stat b:zstat
 zstat -A ctimePrev +ctime $tmp
 $EDITOR $tmp
 zstat -A ctime +ctime $tmp
 [[ $ctime != $ctimePrev ]] || {
-    echo Aborting comment >&2
+    print Aborting comment >&2
     exit 0
 }
 if [[ -s $comment ]]; then
-    $PERL -ne 'print if $can; if (/^$/) { $can=1 };' < $tmp > $comment
+    $PERL -ne 'print if $can; if (/^$/) { $can=1 };' <$tmp >$comment
 else
-    cat < $tmp > $comment
+    cat <$tmp >$comment
 fi
 git add $comment