made local aliases additive to the standard ones. Locals override standard
[spider.git] / cmd / help.pl
index c74fad166ba4a073f70cf2d025be99040b99fcf4..afdd2d302df66cc0d14db4c1dba93ba20b3eaf0d 100644 (file)
@@ -32,7 +32,7 @@ $lang = 'en' if !$lang;
 # The fields are:- privilege level, Language, full command name, short description
 #
 
-my $h = new FileHandle;
+my $h = new IO::File;
 
 if (!open($h, "$main::localcmd/Commands_$lang.hlp")) {
        if (!open($h, "$main::cmd/Commands_$lang.hlp")) {
@@ -43,6 +43,12 @@ my $in;
 
 $line =~ s/![\w\/]//og;
 $line =~ s/\//\.\*\//og;
+$line =~ s/^\s+//og;
+$line =~ s/\s+$//og;
+
+# sort out aliases
+my $alias = CmdAlias::get_hlp($line);
+$line = $alias if $alias;
 
 my $include;
 foreach $in (<$h>) {