chiark
/
gitweb
/
~cjwatson
/
bin.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
burn-dvd: add -dvd-compat for better format compatibility
[bin.git]
/
prune-history
1
#! /usr/bin/perl -wi
2
use strict;
3
4
my @last;
5
6
while (defined (my $line = <>))
7
{
8
unless ($line =~ /^(fg|ls|l|s|sl|cd -|cd ..)$/
9
or grep { $line eq $_ } @last)
10
{
11
print $line;
12
$last[1] = $last[0] if defined $last[0];
13
$last[0] = $line;
14
}
15
}