";
devi@23: $last_tty=$cl->{"tty"};
devi@23: }
devi@23:
devi@23: # TIME
devi@23: if ($Config{"show_time"} =~ /^y/i) {
devi@23: $Result{"body"} .= "".
devi@23: $hour. ":". $min. ":". $sec.
devi@23: " | ";
devi@23: } else {
devi@23: $Result{"body"} .= " | "
devi@23: }
devi@23:
devi@23: # COMMAND
devi@23: $Result{"body"} .= "\n";
devi@23: $Result{"body"} .= "\n";
devi@23: my $cline = $cl->{"cline"};
devi@23: $cline =~ s/\n//;
devi@23: $Result{"body"} .= $cl->{"prompt"}.$cl->{"cline"};
devi@23: $Result{"body"} .= " \n";
devi@23:
devi@23: my $last_command = $cl->{"last_command"};
devi@23: if (!(
devi@23: $Config{"suppress_editors"} =~ /^y/i && grep ($_ eq $last_command, @{$Config{"editors"}}) ||
devi@23: $Config{"suppress_pagers"} =~ /^y/i && grep ($_ eq $last_command, @{$Config{"pagers"}}) ||
devi@23: $Config{"suppress_terminal"}=~ /^y/i && grep ($_ eq $last_command, @{$Config{"terminal"}})
devi@23: )) {
devi@23:
devi@23: $Result{"body"} .= "";
devi@23: $Result{"body"} .= $output;
devi@23: $Result{"body"} .= " \n";
devi@23: }
devi@23:
devi@23: # DIFF
devi@23: if ( $Config{"show_diffs"} =~ /^y/i && $cl->{"diff"}) {
devi@23: $Result{"body"} .= " | ";
devi@23: $Result{"body"} .= $cl->{"diff"};
devi@23: $Result{"body"} .= " | ";
devi@23: }
devi@23:
devi@23: # COMMENT
devi@23: if ( $Config{"show_comments"} =~ /^y/i) {
devi@23: my $comment = make_comment(join(" ",@new_commands), join (" ",@new_files));
devi@23: if ($comment) {
devi@23: $Result{"body"} .= "".
devi@23: " | ";
devi@23: $Result{"body"} .= "";
devi@23: $Result{"body"} .= $comment;
devi@23: $Result{"body"} .= " \n";
devi@23: $Result{"body"} .= " | ";
devi@23: }
devi@23: else {
devi@23: $Result{"body"} .= "".
devi@23: " | ";
devi@23: $Result{"body"} .= "";
devi@23: $Result{"body"} .= "commands ".join(" ",@new_commands)." ";
devi@23: $Result{"body"} .= "files ".join(" ",@new_files)." ";
devi@23: $Result{"body"} .= " \n";
devi@23: $Result{"body"} .= " | ";
devi@23: }
devi@23: }
devi@23:
devi@23: # Вывод очередной команды окончен
devi@23: $Result{"body"} .= " | \n";
devi@23: $Result{"body"} .= "
\n";
devi@23: }
devi@23:
devi@23: $Result{"body"} .= "