use strict; use warnings; package BarnOwl::Module::ReplyQuoted; sub cmd_reply_quoted { my $quoted = BarnOwl::getcurmsg->body; $quoted =~ s/\n*$//; $quoted =~ s/^/> /mg; BarnOwl::reply; BarnOwl::Editwin::insert_text("$quoted\n\n"); } BarnOwl::new_command('reply-quoted' => \&cmd_reply_quoted, { summary => "Reply to the current message with a quoted copy of its body", usage => "reply-quoted", }); 1;