$filename
$histfile
$histsize
+ $histitemminlength
$IN
$inhibit_exit
@ini_INC
@options = qw(
CommandSet HistFile HistSize
+ HistItemMinLength
hashDepth arrayDepth dumpDepth
DumpDBFiles DumpPackages DumpReused
compactDump veryCompact quote
windowSize => \$window,
HistFile => \$histfile,
HistSize => \$histsize,
+ HistItemMinLength => \$histitemminlength
);
=pod
$cmd = $laststep;
}
chomp($cmd); # get rid of the annoying extra newline
- if (length($cmd) >= 2) {
+ if (length($cmd) >= option_val('HistItemMinLength', 2)) {
push( @hist, $cmd );
}
push( @truehist, $cmd );
my $i;
for ( $i = $#hist ; $i > $end ; $i-- ) {
-
- # Print the command unless it has no arguments.
- print $OUT "$i: ", $hist[$i], "\n"
- unless $hist[$i] =~ /^.?$/;
+ print $OUT "$i: ", $hist[$i], "\n";
}
next CMD;
# Add it to the terminal history (if possible).
$term->AddHistory($got)
- if length($got) > 1
+ if length($got) >= option_val("HistItemMinLength", 2)
and defined $term->Features->{addHistory};
return $got;
} ## end if (@typeahead)