added type and show/files
[spider.git] / cmd / type.pl
diff --git a/cmd/type.pl b/cmd/type.pl
new file mode 100644 (file)
index 0000000..e525f94
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# the type command, display bulls and files
+#
+# Copyright (c) 1999 Dirk Koopman G1TLH
+#
+# $Id$
+#
+
+my ($self, $line) = @_;
+my @f = split /\s+/, $line;
+my $root = "$main::root/packclus";
+my @out;
+my @file;
+my @d;
+my @slot;
+
+if (@f) {
+       my $fn = lc $f[0];
+       $fn =~ s/\\/\//og;
+       $fn =~ s/\.//og;
+       $fn =~ s/^\///og;
+       $root = "$root/$fn";
+}
+
+open(INP, $root) or return (1, $self->msg('e3', 'type', $f[0]));
+@out = <INP>;
+close(INP);
+
+return (1, @out);