2 # This package impliments some of the ak1a aliases that can't
3 # be done with interpolation from the file names.
5 # Basically it takes the input and bashes down the list of aliases
6 # for that starting letter until it either matches (in which a substitution
9 # To roll your own Aliases, copy the /spider/cmd/Aliases file to
10 # /spider/local_cmd and alter it to your taste.
12 # To make it active type 'load/aliases'
15 # Copyright (c) 1998 Dirk Koopman G1TLH
28 use vars qw(%alias $fn $localfn);
32 $fn = "$main::cmd/Aliases";
33 $localfn = "$main::localcmd/Aliases";
40 return ($@) if $@ && ref $ref;
45 return ($@) if $@ && ref $ref;
56 # called as CmdAlias::get_cmd("string");
61 my ($let) = unpack "A1", $s;
67 return undef if !$ref;
70 for ($i = 0; $i < $n; $i += 3) {
71 if ($s =~ /$ref->[$i]/i) {
72 my $ri = qq{\$ro = "$ref->[$i+1]"};
82 # called as CmdAlias::get_hlp("string");
87 my ($let) = unpack "A1", $s;
93 return undef if !$ref;
96 for ($i = 0; $i < $n; $i += 3) {
97 if ($s =~ /$ref->[$i]/i) {
98 my $ri = qq{\$ro = "$ref->[$i+2]"};