From: Andy Spencer Date: Wed, 1 Jun 2011 06:46:24 +0000 (+0000) Subject: move trim to end X-Git-Url: http://pileus.org/git/?p=vpaste;a=commitdiff_plain;h=48424c1f3911da6d417e3190623d68ee041daba7 move trim to end --- diff --git a/index.cgi b/index.cgi index 939bf72..f1b8b15 100755 --- a/index.cgi +++ b/index.cgi @@ -87,7 +87,7 @@ function do_print { # Create a temp file with the provided modeline output="$(mktemp)" tmp="$(mktemp)" - sed "1a$(get_modeline)" "$input" > "$tmp" + sed "\$a$(get_modeline)" "$input" > "$tmp" # - I have some plugins in ~/.vim # - Run ex in screen to trick it into thinking that it @@ -99,7 +99,7 @@ function do_print { '+sil! set iconstring= ruf= stl= tal=' \ "+sil! set titlestring=$1\ -\ vpaste.net" \ '+sil! set noml' \ - '+sil! 2d|'$trim \ + '+sil! $d|'$trim \ '+sil! %s/\r//g' \ '+sil! TOhtml' \ "+sav! $output" \