mirror of
https://github.com/fspc/dswim.git
synced 2025-02-22 08:33:24 -05:00
This doesn't permit "" values to be put into the history since ReadLine
complains about this. Just checks that arg isn't "".
This commit is contained in:
parent
7b3b493c07
commit
fa082787da
@ -881,6 +881,7 @@ sub history {
|
||||
push(@HISTORY,$line); undef $line;
|
||||
}
|
||||
|
||||
|
||||
return @HISTORY;
|
||||
|
||||
} # end sub history
|
||||
@ -903,15 +904,14 @@ sub history_print {
|
||||
my @HISTORY = <HISTORY>;
|
||||
close(HISTORY);
|
||||
if ($#HISTORY < $HISTORY - 1) {
|
||||
push(@HISTORY,"$arg\n");
|
||||
push(@HISTORY,"$arg\n") if $arg;
|
||||
}
|
||||
else {
|
||||
shift(@HISTORY);
|
||||
push(@HISTORY,"$arg\n");
|
||||
push(@HISTORY,"$arg\n") if $arg;
|
||||
}
|
||||
open(HISTORY,">$swim_history") or exit;
|
||||
print HISTORY @HISTORY;
|
||||
|
||||
|
||||
} # end sub history_print
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user